Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Polluting DEBUG logs with $SYS published messages #400

Closed
behrad opened this issue Jan 19, 2016 · 1 comment
Closed

Polluting DEBUG logs with $SYS published messages #400

behrad opened this issue Jan 19, 2016 · 1 comment

Comments

@behrad
Copy link
Contributor

behrad commented Jan 19, 2016

This line is really log heavy since is logging all $SYS messages: https://github.com/mcollina/mosca/blob/master/lib/server.js#L357

In my fork I was changing $SYS topic publishes to .trace, I'd forgotten to create a PR, but I'm going to create one if you don't mind @mcollina

@behrad
Copy link
Contributor Author

behrad commented Jan 19, 2016

Can be changed to this

if( packet.topic.indexOf( '$SYS' ) >= 0 ) {
  logger.trace({ packet: packet }, "published packet");
} else {
  logger.debug({ packet: packet }, "published packet");
}

mcollina added a commit that referenced this issue Jan 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant