logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remko Popma <remko.po...@gmail.com>
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 Mon, 02 Feb 2015 23:41:17 GMT
Hi Jordan, 

Currently all our efforts are focussed on log4j2. We are not actively supporting log4j-1.2
anymore. 
Would it be possible for you to upgrade?

Best regards,
Remko

Sent from my iPhone

> On 2015/02/03, at 7:43, 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\\bpm\\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.FixedWindowRollingPolicy 
> log4j.appender.RA.rollingPolicy.maxIndex=10 
> log4j.appender.RA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy

> 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\\bpm\\servers\\BPMServer\\logs\\OBPMConnectorWebService.xml
> log4j.appender.XMLRA.append=true
> log4j.appender.XMLRA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRollingPolicy

> log4j.appender.XMLRA.rollingPolicy.maxIndex=100 
> log4j.appender.XMLRA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy

> 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.FixedWindowRollingPolicy 
> log4j.appender.RA.rollingPolicy.maxIndex=10 
> log4j.appender.RA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy

> 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\\bpm\\servers\\BPMServer\\logs\\OBPMConnectorWebService.xml
> log4j.appender.XMLRA.append=true
> log4j.appender.XMLRA.rollingPolicy=org.apache.log4j.rolling.FixedWindowRollingPolicy

> log4j.appender.XMLRA.rollingPolicy.maxIndex=100 
> log4j.appender.XMLRA.triggeringPolicy=org.apache.log4j.rolling.SizeBasedTriggeringPolicy

> 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
> 
> 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
>  

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