AnsweredAssumed Answered

logging in share

Question asked by sanjaymk on Sep 15, 2011
Hello All -

I wanted to log some information from my Dashlet controller(.js) by using the logger.log method.  In the Share debug window, I found the logger to be of type log4j.logger.org.springframework.extensions.webscripts.ScriptLogger

So, I went into share/WEB-INF/classes/log4j.properties and set the log level of log4j.logger.org.springframework.extensions.webscripts.ScriptLogger to DEBUG.   This change wasn't effective in making my log statements to log any information.  After doing some searches in the forum, I found out that setting the log4j.logger.org.alfresco.repo.jscript in the log4j.properties to DEBUG will turn on logging in share dashlets.  So, I went in and made this change in my log4j.properties and this made my logger to be enabled and in turn log my statements into a log file. 

But I'm a confused by the discrepancy between the type of the logger that is being shown in the debugger and the actual type that needs to be set in the log4j.properties file. 

Anybody have any good explanation for this discrepancy(from my understanding)?  Any useful comments would be highly appreciated.

Thanks,
Sanjay.

Outcomes