cancel
Showing results for 
Search instead for 
Did you mean: 

share and logger.log

vincent-kali
Star Contributor
Star Contributor
Hi all,
I'm customizing a presentation webscript in share (member-bar.get.js).
I want to log some info from my webscript controller, but I don't have
any output in log file (share.log / Catalina.out).

config in /share/WEB-INF/classes/log4j.properties   

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


in js file:

logger.log("my message");


No ouput in log file.
(the js file is executed).

Did I miss something ?

thanks,
Vincent

3 REPLIES 3

vincent-kali
Star Contributor
Star Contributor
I also checked that logger.isLogginEnabled() and logger.isWarnLogginEnabled() methods are always returning false….

Could somebody advise on this ?


thanks,


log4j.appender.File.File={path to your log file}

Will get you a log file (you need to do both share & alfresco log4j.properties and I do share.log and alfresco.log as separate files just to be sure)

log4j.logger.org.alfresco.repo.web.scripts=debug
log4j.logger.org.alfresco.repo.jscript=debug

in the scripting / repository section of log4j.props in alfresco & share log4j.properties

Should get you output. It does for me


Hi Bob,
Thanks for your reply. I'll try this and share the result ASAP.
Regards,
Vincent