logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon <simon_park_m...@yahoo.co.uk>
Subject Re: Why RollingFileAppender do not work by size on WebLogic 10.3.3 with Log4J 1.2.16 and jdk 1.6.0_33?
Date Wed, 04 Feb 2015 07:44:35 GMT
If there's a great reason why you can't make the move to Log4J 2.x then you could try the TimeAndSizeRollingAppender
for Log4J 1.2.x. Google the appender name.

Best Regards, 

Simon

Sent from Blue Mail



On 22:45, 2 Feb 2015, at 22:45, "Jordán E Moisés" <jordan.moises@kennen-consulting.com>
wrote:
>Why RollingFileAppender do not work by size on WebLogic 10.3.3 with
>Log4J
>1.2.16 and jdk 1.6.0_33 ?
>
> 
>
>PROBLEM
>
>The file grows over the limit set by configuration. It only creates a
>new
>one when the WebLogic is restarted.
>
> 
>
>DATA
>
>My "log4j.properties" is place at WEBAPP.war:\WEB-INF\classes
>
>My "log4j-1.2.16.jar" is place at WEBAPP.war:\WEB-INF\lib
>
> 
>
>This is my 1st version of "log4j.properties"
>
># Root logger option
>
>log4j.rootLogger=DEBUG, XMLRA, CA, RA
>
> 
>
># Direct log messages to a log file
>
>log4j.appender.RA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.RA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.RA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.RA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bpm\\
>servers\\BPMServer\\logs\\OBPMConnectorWebService.log
>
>log4j.appender.RA.append=true
>
>log4j.appender.RA.MaxFileSize=2MB
>
>log4j.appender.RA.MaxBackupIndex=10
>
>log4j.appender.RA.BufferedIO=true
>
>log4j.appender.RA.ImmediateFlush=false
>
>log4j.appender.RA.BufferSize=4096
>
>log4j.appender.RA.Threshold=warn
>
> 
>
># Direct log messages to stdout
>
>log4j.appender.CA=org.apache.log4j.ConsoleAppender
>
>log4j.appender.CA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.CA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.CA.Target=System.out
>
>log4j.appender.cA.Threshold=all
>
> 
>
># Direct log messages to a log xml
>
>log4j.appender.XMLRA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.XMLRA.layout=org.apache.log4j.xml.XMLLayout
>
>log4j.appender.XMLRA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bp
>m\\servers\\BPMServer\\logs\\OBPMConnectorWebService.xml
>
>log4j.appender.XMLRA.append=true
>
>log4j.appender.XMLRA.MaxFileSize=20MB
>
>log4j.appender.XMLRA.MaxBackupIndex=100
>
>log4j.appender.XMLRA.BufferedIO=true
>
>log4j.appender.XMLRA.ImmediateFlush=false
>
>log4j.appender.XMLRA.BufferSize=4096
>
> 
>
>This is my 2nd version of "log4j.properties" (I found some examples on
>the
>Internet and I applied the changes without a solution)
>
># Root logger option
>
>log4j.rootLogger=DEBUG, XMLRA, CA, RA
>
> 
>
># Direct log messages to a log file
>
>log4j.appender.RA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.RA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.RA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.RA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bpm\\
>servers\\BPMServer\\logs\\OBPMConnectorWebService.log
>
>log4j.appender.RA.append=true
>
>log4j.appender.RA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRollingP
>olicy 
>
>log4j.appender.RA.rollingPolicy.maxIndex=10 
>
>log4j.appender.RA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTrigger
>ingPolicy 
>
>log4j.appender.RA.triggeringPolicy.MaxFileSize=2048 
>
>log4j.appender.RA.BufferedIO=true
>
>log4j.appender.RA.ImmediateFlush=false
>
>log4j.appender.RA.BufferSize=4096
>
>log4j.appender.RA.Threshold=warn
>
> 
>
># Direct log messages to stdout
>
>log4j.appender.CA=org.apache.log4j.ConsoleAppender
>
>log4j.appender.CA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.CA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.CA.Target=System.out
>
>log4j.appender.cA.Threshold=all
>
> 
>
># Direct log messages to a log xml
>
>log4j.appender.XMLRA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.XMLRA.layout=org.apache.log4j.xml.XMLLayout
>
>log4j.appender.XMLRA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bp
>m\\servers\\BPMServer\\logs\\OBPMConnectorWebService.xml
>
>log4j.appender.XMLRA.append=true
>
>log4j.appender.XMLRA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRolli
>ngPolicy 
>
>log4j.appender.XMLRA.rollingPolicy.maxIndex=100 
>
>log4j.appender.XMLRA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTrig
>geringPolicy 
>
>log4j.appender.XMLRA.triggeringPolicy.MaxFileSize=20480
>
>log4j.appender.XMLRA.BufferedIO=true
>
>log4j.appender.XMLRA.ImmediateFlush=false
>
>log4j.appender.XMLRA.BufferSize=4096
>
> 
>
>This is my 3rd version of "log4j.properties" (I set the suffix of unit
>of
>size without a solution)
>
># Root logger option
>
>log4j.rootLogger=DEBUG, XMLRA, CA, RA
>
> 
>
># Direct log messages to a log file
>
>log4j.appender.RA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.RA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.RA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.RA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bpm\\
>servers\\BPMServer\\logs\\OBPMConnectorWebService.log
>
>log4j.appender.RA.append=true
>
>log4j.appender.RA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRollingP
>olicy 
>
>log4j.appender.RA.rollingPolicy.maxIndex=10 
>
>log4j.appender.RA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTrigger
>ingPolicy 
>
>log4j.appender.RA.triggeringPolicy.MaxFileSize=2MB 
>
>log4j.appender.RA.BufferedIO=true
>
>log4j.appender.RA.ImmediateFlush=false
>
>log4j.appender.RA.BufferSize=4096
>
>log4j.appender.RA.Threshold=warn
>
> 
>
># Direct log messages to stdout
>
>log4j.appender.CA=org.apache.log4j.ConsoleAppender
>
>log4j.appender.CA.layout=org.apache.log4j.PatternLayout
>
>log4j.appender.CA.layout.ConversionPattern=[%d{dd/MMM/yyyy
>HH:mm:ss:SSS}]
>%-5p %c -> %m%n
>
>log4j.appender.CA.Target=System.out
>
>log4j.appender.cA.Threshold=all
>
> 
>
># Direct log messages to a log xml
>
>log4j.appender.XMLRA=org.apache.log4j.RollingFileAppender
>
>log4j.appender.XMLRA.layout=org.apache.log4j.xml.XMLLayout
>
>log4j.appender.XMLRA.File=c:\\Oracle\\Middleware\\user_projects\\domains\\bp
>m\\servers\\BPMServer\\logs\\OBPMConnectorWebService.xml
>
>log4j.appender.XMLRA.append=true
>
>log4j.appender.XMLRA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRolli
>ngPolicy 
>
>log4j.appender.XMLRA.rollingPolicy.maxIndex=100 
>
>log4j.appender.XMLRA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTrig
>geringPolicy 
>
>log4j.appender.XMLRA.triggeringPolicy.MaxFileSize=20MB
>
>log4j.appender.XMLRA.BufferedIO=true
>
>log4j.appender.XMLRA.ImmediateFlush=false
>
>log4j.appender.XMLRA.BufferSize=4096
>
> 
>
>---------------------------------------------------------------------------
>
> 
>
>Before using "log4j.properties" I set all this properties by code
>
>Both the coded version as with the 1st "log4j.properties" file version,
>works fine outside WebLogic. I mean it worked with an application
>launched
>from the OS console.
>
> 
>
> 
>
>I 'm using a wrong version of Log4J? I have to use the "log4j.xml" file
>instead for a Web application?
>
>May be I have to change the roll over by time?
>
> 
>
>Please I need some help and I have no response at Oracle WebLogic Forum
>
> 
>
>Regards
>
>Jordán
>
> 
>
> 
>
>Jordán Eduardo Moisés
>
>cid:924330204@09022013-1D1E
>
>Av Belgrano 768 - piso 5 depto I
>C.P: C1092AAU
>Buenos Aires - Argentina 
>Teléfono: (54 11) 5256-4060
>Móvil: (54 9 11) 5751-1359
>Web: www.kennen-consulting.com
><blocked::http://www.kennen-consulting.com/> 
>
> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message