logger.debug

cancel
Showing results for 
Search instead for 
Did you mean: 
Established Member

logger.debug

If I use logger.log or logger.debug in server side javascript

like

logger.log("Hello");

Will "Hello" get printed in console or some log file?

2 Replies
Master

Re: logger.debug

It depends on the Log4J configuration. By default logger.log will not print to the console / alfresco.log / share.log unless you change the log level threshold via the custom-log4j.properties (Repository-tier only) or by modifying the default log4j.properties (unfortunately the only way for Share-tier). The setting you need to add for logger.log to output anything is

log4j.logger.org.springframework.extensions.webscripts.ScriptLogger=debug

since logger.log translates to "debug" level of logging

Customer

Re: logger.debug

Hi:

As additional comment to Axel's one, you can use logger.warn() to print your logs in catalina.out and alfresco.log with default Alfresco configuration. You can check it easily with Javascript Console. 

Regards.

--C.