cancel
Showing results for 
Search instead for 
Did you mean: 

Javascript Logging in WebQuickStart

simon_white
Champ in-the-making
Champ in-the-making
Hi everyone,

Can anyone help me work out how to turn Javascript logging on in wcmqs?

On the assumption that the logger is the same class used by Share, I've tried editing log4j.xml and adding:


        <logger name="org.springframework.extensions.webscripts.ScriptLogger">
                <level value="debug"/>
        </logger>

..but this doesn't seem to work.  Alfresco runs past my logger.log statements quite happily, so clearly logging is available. 

I'll have a beaver through the source and see if I can find out which class is bound to "logger" in the .js but suspect this is as per Spring Surf, which means the class above should be the right one.

Thanks in advance,

Simon
3 REPLIES 3

bremmington
Champ on-the-rise
Champ on-the-rise
That is odd. Does "logger.warn" output anything? Sorry if this sounds like a silly question, but presumably you are watching the "wcmquickstart.log" file?

simon_white
Champ in-the-making
Champ in-the-making
Brian,

After fiddling around for a few minutes I got the logging working by specifying the package name rather than the class name in log4j.xml.  So the following worked fine:


        <logger name="org.springframework.extensions.webscripts">
                <level value="debug"/>
        </logger>

bremmington
Champ on-the-rise
Champ on-the-rise
Great. Thanks for letting me know.