cancel
Showing results for 
Search instead for 
Did you mean: 

write to the log file

forumwebuser
Champ in-the-making
Champ in-the-making
Hello,

Im working with two alfresco environments: windows desktop and ubuntu server.

I have developed some components and, for debugging reasons im writing to the console. I can use this on the windows machine because in windows Im running alfresco using the bat file (console mode). However, as far as I know, I cant do this in ubuntu.

So, instead of writing to the console, I tried to write to the log file using log4j. First in each component I create a log4j object and I set the message like info and debugging. Then I set something like this in the  log4j.propertiesfile:

log4j.logger.com.alfresco.myenterpise.services=info -> in order to log the info entries

or
log4j.logger.com.alfresco.myenterpise.services=debug -> in order to log the debugging entries

Note that "com.alfresco.myenterpise.services" is exactly the path Im using in the organization of my classes in eclipse.

I then restarted alfresco. However, I cant see any log written to the catalina log file…

Am I missing something?

thank you
2 REPLIES 2

rwetherall
Confirmed Champ
Confirmed Champ
Have you tried using the JAVA options "-Dlog4j.debug=true" … this will give you information at run time about which log4j configuration files are being loaded and other useful information that might help debug the issue.

Cheers,
Roy

forumwebuser
Champ in-the-making
Champ in-the-making
Actually my problem was that I was looking for the wrong file…
However your tip is very helpfull,

thank you