less extraneous data logs

This commit is contained in:
Daniel Lugo 2020-07-23 17:43:40 -04:00
parent 1eb4c59ab6
commit 2a68ff8743
4 changed files with 9 additions and 9 deletions

View file

@ -2,6 +2,7 @@
const debounce = require('lodash/debounce')
const logger = require('winston')
const { Schema } = require('shock-common')
const size = require('lodash/size')
const Key = require('../key')
const Streams = require('../streams')
@ -96,7 +97,7 @@ const listenerForAddr = addr => data => {
}
}
logger.info('data for address: ' + addr)
logger.info('data for address length: ' + size(addr))
logger.info(JSON.stringify(data, null, 4))
react()

View file

@ -1,6 +1,7 @@
/** @format */
const debounce = require('lodash/debounce')
const logger = require('winston')
const size = require('lodash/size')
const Streams = require('../streams')
/**
@ -29,7 +30,7 @@ const listeners = new Set()
let currentReqs = []
listeners.add(() => {
logger.info(`new sent reqs: ${JSON.stringify(currentReqs)}`)
logger.info(`new sent reqs length: ${currentReqs}`)
})
const getCurrentSentReqs = () => currentReqs
@ -55,9 +56,7 @@ const react = debounce(() => {
// pk to display name
const pubToDN = Streams.getPubToDn()
logger.info(
`pubToLastSentREqID: ${JSON.stringify(pubToLastSentReqID, null, 4)}`
)
logger.info(`pubToLastSentREqID length: ${size(pubToLastSentReqID)}`)
for (const storedReq of storedReqs) {
const { handshakeAddress, recipientPub, sentReqID, timestamp } = storedReq

View file

@ -3,6 +3,7 @@ const uuidv1 = require('uuid/v1')
const logger = require('winston')
const debounce = require('lodash/debounce')
const { Schema, Utils: CommonUtils } = require('shock-common')
const size = require('lodash/size')
const Key = require('../key')
const Utils = require('../utils')
@ -29,7 +30,7 @@ let pubToFeed = {}
const getPubToFeed = () => pubToFeed
feedsListeners.add(() => {
logger.info(`new pubToFeed: ${JSON.stringify(getPubToFeed())}`)
logger.info(`new pubToFeed length: ${size(getPubToFeed())}`)
})
/** @param {Feeds} ptf */

View file

@ -3,6 +3,7 @@ const uuidv1 = require('uuid/v1')
const debounce = require('lodash/debounce')
const logger = require('winston')
const { Utils: CommonUtils } = require('shock-common')
const size = require('lodash/size')
const { USER_TO_INCOMING } = require('../key')
/** @typedef {import('../SimpleGUN').OpenListenerData} OpenListenerData */
@ -30,9 +31,7 @@ const setPubToIncoming = pti => {
let latestUpdate = uuidv1()
listeners.add(() => {
logger.info(
`new pubToIncoming: ${JSON.stringify(getPubToIncoming(), null, 4)}`
)
logger.info(`new pubToIncoming length: ${size(getPubToIncoming())}`)
})
const onOpen = debounce(async uti => {