geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goodz <good...@hotmail.com>
Subject RE: Logging of WebApps in seperate files
Date Fri, 20 Apr 2007 16:28:36 GMT

Hello,

I was wondering if one of you could give me a hand to try to figure this
out.  I tried to follow the instructions, but had no luck.  Here is what I
have in ${org.apache.geronimo.server.dir}/var/log/server-log4j.properties:



# create appender
log4j.appender.MYTEST=org.apache.log4j.DailyRollingFileAppender 
log4j.appender.MYTEST.threshold=DEBUG
log4j.appender.MYTEST.layout=org.apache.log4j.PatternLayout
log4j.appender.MYTEST.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}]
%m%n

log4j.appender.MYTEST.append=true
log4j.appender.MYTEST.file=${org.apache.geronimo.server.dir}/var/log/mytest.log
log4j.appender.MYTEST.bufferedIO=false
log4j.appender.MYTEST.maxBackupIndex=3
log4j.appender.MYTEST.maxFileSize=10MB

# my.package also happens to be by groupid in the geronimo-web.xml
log4j.category.my.package=INFO, MYTEST



I just can't seem to get it to work.  Please let me know what I am doing
incorrcetly.


&quot;Weßling, Achim&quot; wrote:
> 
> Works like a charm! Thanks!
> 
> Achim
> 
> Am Donnerstag, den 21.09.2006, 10:38 +0200 schrieb Unger, Milan:
>> Hi, 
>> 
>> I'm not expert for log4j, so cannot say what's wrong in your config,  
>> but below configuration works for me -- put it in
>> <geronimo>/var/log/server-log4j.properties and change as appropriate.
>> 
>> Regards, Milan.
>> 
>> # create appender 
>> log4j.appender.LAB=org.apache.log4j.RollingFileAppender 
>> log4j.appender.LAB.threshold=DEBUG 
>> log4j.appender.LAB.layout=org.apache.log4j.PatternLayout 
>> log4j.appender.LAB.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}]
>> %m%n
>> 
>> log4j.appender.LAB.append=false 
>> log4j.appender.LAB.file=
>> ${org.apache.geronimo.server.dir}/var/log/moolab.log 
>> log4j.appender.LAB.bufferedIO=false 
>> log4j.appender.LAB.maxBackupIndex=3 
>> log4j.appender.LAB.maxFileSize=10MB
>> 
>> # send your categories to new appender  
>> log4j.category.sk.moolab=INFO, LAB
>> 
>> 
>> -----Original Message----- 
>> From: Achim Weßling [mailto:achim.wessling@gt-net.de] 
>> Sent: št 21. 9. 2006 9:26 
>> To: user@geronimo.apache.org 
>> Subject: Logging of WebApps in seperate files 
>>   
>> Hallo,
>> 
>> I want to put the logging-information of my webapps in seperate
>> files. 
>> In the past I achived this by using the following log4j configuration:
>> 
>> log4j.appender.logFile.layout=org.apache.log4j.PatternLayout 
>> log4j.appender.logFile.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%
>> n 
>> log4j.appender.logFile=org.apache.log4j.DailyRollingFileAppender 
>> log4j.appender.logFile.File=/opt/geronimo/var/log/AlkService.log 
>> log4j.appender.logFile.DatePattern='.'dd-MM-yyyy 
>> log4j.rootLogger=DEBUG, logFile
>> 
>> But under geronimo this doesn't work. All logging goes to 
>> 'geronimo.out'. Any help would be nice ;-)
>> 
>> Achim
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Logging-of-WebApps-in-seperate-files-tf2310215s134.html#a10105777
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message