qzind / qz-print

Archive for legacy qz-print versions (1.8, 1.9). See https://github.com/qzind/tray for modern versions.
Other
141 stars 101 forks source link

Option to reduce console.log verbosity #111

Closed tresf closed 8 years ago

tresf commented 8 years ago

Currently the web console log is very busy with websocket messages. The option to reduce the verbosity would be nice for developers that may need to parse the log for non-qz related events.

nhouse commented 8 years ago

Perhaps you could add a flag to qzConfig like showDebugOutput set to true by default. So then I could do:

qzConfig.showDebugOutput = false;
deployQZ();

Then you could change you console.log() statements from:

console.log(WebSocket);

To:

if (qzConfig.showDebugOutput) { console.log(WebSocket); }
tresf commented 8 years ago

Stared via https://github.com/qzind/qz-print/pull/119. @bberenz, etc, feedback welcome.

akberenz commented 8 years ago

Already being taken care of as _qz.DEBUG in the 2.0 branch, to address this very issue. I can port the logging level code, if you'd rather the fine level control.

tresf commented 8 years ago

@bberenz thanks for the quick response.

I'll keep consistent with 2.0 then. Simplified via https://github.com/qzind/qz-print/commit/4db4d684365ae2dd4d21da5df2b4b8f6c2465685. Second set of eyes is greatly appreciated.