Bug 171 - Chat console.log spam
Summary: Chat console.log spam
Status: CONFIRMED
Alias: None
Product: ZeXtras
Classification: Unclassified
Component: ZxChat (show other bugs)
Version: 2.0.4
Hardware: Physical Infrastructure All
: Normal normal
Assignee: ZeXtras Bugzilla Admin
QA Contact:
URL:
Depends on:
Blocks:
 
Reported: 2015-12-09 08:23 CET by info
Modified: 2016-01-16 07:15 CET (History)
2 users (show)

See Also:
Browser: ---
Zimlet Chat version: 1.33
Zimbra Version: 8.6.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description info 2015-12-09 08:23:55 CET
Right now, when I deploy ZxChat it will log a lot of messages to the browsers console log. About once a second?

This is very annoying when doing development on other parts of Zimbra, since the browser console.log is flushed with messages from ZxChat.

Suggest you make the informational messages optional (via the debug checkbox in ZxChat or via COS or other global option) and only log ERROR's to the console.log. 

Thanks, regards, Barry
Comment 1 info 2015-12-09 09:29:47 CET
For example:

Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3922 9-11-2015 10:28:54,732 LOG [Received contact information event]
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3935 d
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3922 9-11-2015 10:28:54,737 LOG [Received an event on ping]
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3935 d
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3922 9-11-2015 10:28:54,737 LOG [Received contact information event]
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3935 d
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3922 9-11-2015 10:28:54,742 LOG [Received an event on ping]
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3935 d
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3922 9-11-2015 10:28:54,743 LOG [Received contact information event]
Zimlets-nodev_all.js.zgz?language=en&country=US&cosId=e00428a1-0c00-11d9-836a-000d93afea2a:3935 d
(index):2198 ------------------------------------- Loading package: TasksCore
Comment 2 Bud 2015-12-09 09:50:05 CET
The log engine is designed to help the developers to see what is happening and investigate in case of a runtime failure.

In the future We can review the log engine, for now, the most efficient way is to set the log level 'manually' into the logger.

A developer can do that in this way:

- Open the JS console of the browser (eg. F12 in Chrome)
- Type this command in the console:
    ZxDevTools.getLogEngine().getLogger('chat').setLogLevel('warn')
- Hit the Enter key

Starting from that point, the chat logger will show only warning and error lines.
Comment 3 Cine 2015-12-15 15:09:26 CET
Closing as "Resolved - Won't Fix" as per Bud's comment. 

Clarification: the issue appears only when in Dev Mode as in this case debug verbosity is automatically enabled and can be changed with the command mentioned by Bud.
Comment 4 info 2015-12-15 15:56:05 CET
No actually, the logging is ALWAYS there, not only in dev mode.


So please do not put `WONTFIX`
Comment 5 Cine 2015-12-15 16:26:05 CET
Reopened and reported to the devs, verbose logging should only happen in Dev Mode...
Comment 6 info 2016-01-16 07:15:19 CET
work-around


rm -Rf /opt/zimbra/zimlets-deployed/_dev/tk_barrydegraaff_disable_zxlogging/
    mkdir /opt/zimbra/zimlets-deployed/_dev/tk_barrydegraaff_disable_zxlogging/
    cd /opt/zimbra/zimlets-deployed/_dev/tk_barrydegraaff_disable_zxlogging/
    wget https://raw.githubusercontent.com/Zimbra-Community/zimbra-patches/master/tk_barrydegraaff_disable_zxlogging/tk_barrydegraaff_disable_zxlogging.xml
    wget https://raw.githubusercontent.com/Zimbra-Community/zimbra-patches/master/tk_barrydegraaff_disable_zxlogging/tk_barrydegraaff_disable_zxlogging.js


See also : https://github.com/Zimbra-Community/zimbra-patches