cancel
Showing results for 
Search instead for 
Did you mean: 

log4j not flushing file log contents

cgiuliano
Champ in-the-making
Champ in-the-making
Hi everybody,

I have some troubles with Alfresco 4.2.e file logs: I can see many messages in Tomcat console, but I cannot have the same messages written into the log file.
I've tried to change the log4j configuration in WEB-INF\classes\log4j.properties
modifying the following

log4j.appender.File.ImmediateFlush=true
log4j.appender.File.BufferedIO=false
log4j.appender.File.BufferSize=1
or (lower case)

log4j.appender.File.immediateFlush=true
log4j.appender.File.bufferedIO=false
log4j.appender.File.bufferSize=1
but nothing had the expected result.

Does anyone know how to override the default buffering behaviour? I do need the log file to be promptly updated as soon as an error is pointed out.

Thank you.
Carlo
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

what kind of message do you see in the Tomcat logs? It may very well be that you get messages which do not even pass through Log4j and thus can't be logged to file…
I have not yet encountered any situation where Log4j would buffer any log output in Alfresco. The most common reason for Log4j not to log are missing file system permission, i.e. the Tomcat server not being allowed to write to the path pointing to alfresco.log

Regards
Axel

cgiuliano
Champ in-the-making
Champ in-the-making
Hi Axel,
thanks a lot for your suggestion (and sorry for my late reply…).

I will try to take a screenshot and provide more information, in case I'll come into this issue again.

Thank you.
Regards,
Carlo