You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by vishist mandapaka <vi...@gmail.com> on 2008/06/29 19:38:40 UTC

[Logging] Problem with rollover

Hi,
    We're using commons-logging as part of our logging framework. The 
environment is websphere process server 6.x on windows server 2003 with 
jdk 1.4. For some reason, the rollover of logs files is not happening 
and its overwriting the same file. The same configuration file was used 
with other projects on weblogic and websphere portal and its working 
fine. I'm enclosing the log4j configuration file along with this mail. I 
manually created rollover-files just to get around the scenario where 
the server may not have permissions to create a log file, but the 
strange thing is it is deleting the rollover log files and writing onto 
the same file. Please let me know if I'm missing anything here.

thanks
vishist.

# increasing priority levels:  debug, info, warn, error, fatal
#log4j.rootLogger=ERROR, stdout, error
log4j.rootLogger=DEBUG, debug, ERROR, error

# Application console logs
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout

# Pattern to output the caller's file name and line number.
#log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n
log4j.appender.stdout.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c 
- %m%n

# Debug Log
log4j.appender.debug=org.apache.log4j.RollingFileAppender
log4j.appender.debug.File=cesuservices_debug.log
log4j.appender.debug.MaxFileSize=5000KB
log4j.appender.debug.MaxBackupIndex=9
log4j.appender.debug.Threshold=DEBUG
log4j.appender.debug.layout=org.apache.log4j.PatternLayout
log4j.appender.debug.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c - 
%m%n

# Error Log
log4j.appender.error=org.apache.log4j.RollingFileAppender
log4j.appender.error.File=cesuservices_error.log
log4j.appender.error.MaxFileSize=5000KB
log4j.appender.error.MaxBackupIndex=9
log4j.appender.error.Threshold=ERROR
log4j.appender.error.layout=org.apache.log4j.PatternLayout
log4j.appender.error.layout.ConversionPattern=%d{ISO8601} %-5p [%t] %c - 
%m%n

# Aplication
log4j.logger.debug.com=DEBUG, debug
#log4j.logger.error.com=ERROR, stdout, error
log4j.additivity.error.com.pwc=false
log4j.additivity.debug.com.pwc=false

# All
log4j.logger.org=FATAL
log4j.logger.net=FATAL

# Velocity
log4j.logger.org.apache.velocity=FATAL


# Hibernate
#log4j.logger.net.sf.hibernate.SQL=DEBUG
#log4j.logger.net.sf.hibernate.engine.QueryParameters=DEBUG





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [Logging] Problem with rollover

Posted by simon <si...@chello.at>.
Hi,

On Sun, 2008-06-29 at 13:38 -0400, vishist mandapaka wrote:
> Hi,
>     We're using commons-logging as part of our logging framework. The 
> environment is websphere process server 6.x on windows server 2003 with 
> jdk 1.4. For some reason, the rollover of logs files is not happening 
> and its overwriting the same file. The same configuration file was used 
> with other projects on weblogic and websphere portal and its working 
> fine. I'm enclosing the log4j configuration file along with this mail. I 
> manually created rollover-files just to get around the scenario where 
> the server may not have permissions to create a log file, but the 
> strange thing is it is deleting the rollover log files and writing onto 
> the same file. Please let me know if I'm missing anything here.

You should ask about this issue on the log4j lists, not the commons
list. See:
  http://logging.apache.org/

This list is the right place for commons-logging issues. However all
that commons-logging does is figure out which logging library to pass
the call onto. As long as it is doing that right, the rest (eg logfile
rolling) is up to whichever logging lib you are using.

Regards,
Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [Logging] Problem with rollover

Posted by vishist mandapaka <vi...@gmail.com>.
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Vishist,
>
> As Simon mentioned, this is not a commons-logging issue, it is a log4j
> issue. In the interest of getting your question answered, though, please
> read on.
>
    My apologies for posting to a wrong list. I'll continue my search 
with log4j group.
> vishist mandapaka wrote:
> | We're using commons-logging as part of our logging framework. The
> | environment is websphere process server 6.x on windows server 2003 with
> | jdk 1.4. For some reason, the rollover of logs files is not happening
> | and its overwriting the same file.
>
> [snip]
>
> | log4j.appender.debug.MaxFileSize=5000KB
> | log4j.appender.debug.MaxBackupIndex=9
>
> | The same configuration file was used
> | with other projects on weblogic and websphere portal and its working
> | fine.
>
> Were these other projects using the same version of log4j? Are you sure
> that log4j is being used by commons-logging, or is it possible that the
> java.util.logging is being used instead, with no rolling configured
> (unlikely given that the backup files are being expunged on startup).
I'm sure that log4j 1.2.8 is being used by commons as the pattern of log 
format, log file size (changed the file size to ~100 KB to test 
rollover) is consistent with that configured in the properties file. The 
same
properties file is used by portal. The strange thing is that how can 
logging framework delete a file like "application.log.[1-10]" created by 
me and then continue writing to "application.log" file.

Anyway, I appreciate you responding to me.
>
> - -chris
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkhoRbMACgkQ9CaO5/Lv0PDN/wCeLxrsjcDkNMui6ccqRmr9XLrn
> /GQAn2zSBA65ZWeWSludNvFenL1JFzOh
> =dRM/
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
thanks,
vishist.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [Logging] Problem with rollover

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vishist,

As Simon mentioned, this is not a commons-logging issue, it is a log4j
issue. In the interest of getting your question answered, though, please
read on.

vishist mandapaka wrote:
| We're using commons-logging as part of our logging framework. The
| environment is websphere process server 6.x on windows server 2003 with
| jdk 1.4. For some reason, the rollover of logs files is not happening
| and its overwriting the same file.

[snip]

| log4j.appender.debug.MaxFileSize=5000KB
| log4j.appender.debug.MaxBackupIndex=9

| The same configuration file was used
| with other projects on weblogic and websphere portal and its working
| fine.

Were these other projects using the same version of log4j? Are you sure
that log4j is being used by commons-logging, or is it possible that the
java.util.logging is being used instead, with no rolling configured
(unlikely given that the backup files are being expunged on startup).

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhoRbMACgkQ9CaO5/Lv0PDN/wCeLxrsjcDkNMui6ccqRmr9XLrn
/GQAn2zSBA65ZWeWSludNvFenL1JFzOh
=dRM/
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org