You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Jean-Noel WALLEZ <jn...@wavenet.be> on 2003/03/07 19:18:23 UTC
Re: Error in renaming the file During DailyRollover option
Ceki ,
first thanks for your support !
I have try with log4j.debug=true
but it doesn't work
here is the output - everything seems ok, no?
log4j:ERROR Failed to rename [../logs/conferences.log] to
[../logs/conferences.log.2003-03-07-19-05].
log4j: setFile called: ../logs/conferences.log, false
log4j: setFile ended
log4j:ERROR Failed to rename [../logs/conferences.log] to
[../logs/conferences.log.2003-03-07-19-09].
log4j: setFile called: ../logs/conferences.log, false
log4j: setFile ended
log4j: Parsing for [root] with value=[DEBUG, rolling, smtp].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "rolling".
log4j: Parsing layout options for "rolling".
log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} - %p %c -%m%n].
log4j: End of parsing for "rolling".
log4j: Setting property [datePattern] to [.yyyy-MM-dd-HH-mm].
log4j: Setting property [file] to [../logs/conferences.log].
log4j: setFile called: ../logs/conferences.log, true
log4j: setFile ended
log4j: Appender [rolling] to be rolled every minute.
log4j: Parsed "rolling" options.
log4j: Parsing appender named "smtp".
log4j: Parsing layout options for "smtp".
log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} - %p %c -%m%n].
log4j: End of parsing for "smtp".
log4j: Setting property [SMTPHost] to [relay.skynet.be].
log4j: Setting property [to] to [jnw@wavenet.be].
log4j: Setting property [from] to [info@oriflame.be].
log4j: Setting property [subject] to [Log4j at Conferences application].
log4j: Setting property [threshold] to [FATAL].
log4j: Parsed "smtp" options.
log4j: Finished configuring.
----- Original Message -----
From: "Ceki Gülcü" <ce...@qos.ch>
To: "Jean-Noel WALLEZ" <jn...@wavenet.be>
Sent: Friday, March 07, 2003 2:14 PM
Subject: Re: Error in renaming the file During DailyRollover option
>
> Can you please direct your question to log4j-user@jakarta.apache.org?
>
> I don't see anything wrong with your config file. Have you tried running
it
> with
>
> log4j.debug=true
>
> ?
>
> At 02:55 PM 3/6/2003 +0100, you wrote:
> >Can you help me?
> >
> >I use the version "jakarta-log4j-1.2.8"
> >
> >And don't manage to rename the file
> >
> >Here is my configuration
> >
> ># Configure the rolling appender to be a RollingFileAppender
> >log4j.appender.rolling=org.apache.log4j.DailyRollingFileAppender
> >
> ># Configure the name of the logout for the rolling appender
> >log4j.appender.rolling.File=c:\\data\\clients\\oriflame\\jnw.txt
> >log4j.appender.rolling.DatePattern='.'yyyy-MM-dd-HH-mm
> >log4j.appender.rolling.Append = true
> >log4j.appender.rolling.layout=org.apache.log4j.PatternLayout
> >log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p
%c -%m%n
> >
> >
> >regards
> >
> >JN WALLEZ
>
> --
> Ceki
>
> -
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Want to open multiple files for different classes.
Posted by Prasanna <pr...@celoxis.com>.
Hi,
I'm using log4j and I found it very much useful.
I have some problem with log4j. Actually I don't know how to use it
efficiently.
Plz help me.
Below is my log4j.properties.
1) Now what I want to do is..... I want to open a new file say migrate.log
just for 2 classes i.e. dbmigrate and SQL.
2) Also if I gave "A1" as parameter in first statement instead of "A" then
the UI of log4j
appears and automatically closes after printing logs in it. What I want
is
the program should terminate and the log4j UI should remain holding all
logs.
So how could I do that?
log4j.rootCategory=DEBUG, console, A
log4j.rootLogger=DEBUG, A
log4j.additivity.rootLogger=false
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.logger.com.psa=ERROR, console
log4j.logger.com.services=ERROR, console
log4j.logger.com.dbmigrate=DEBUG, console
log4j.logger.com.db.SQL=DEBUG, console
log4j.logger.org.apache.torque=ERROR, console
log4j.appender.A=org.apache.log4j.FileAppender
log4j.appender.A.File=/tmp/application.log
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%-5p %.20c{2} %.10M (%F:%L) - %m
%n
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Error in renaming the file During DailyRollover option
Posted by Prasanna <pr...@celoxis.com>.
Hi,
I'm using log4j and I found it very much useful.
I have some problem with log4j. Actually I don't know how to use it
efficiently.
Plz help me.
Below is my log4j.properties.
1) Now what I want to do is..... I want to open a new file say migrate.log
just for 2 classes i.e. dbmigrate and SQL.
2) Also if I gave "A1" as parameter in first statement then the UI of log4j
appears and automatically closes after printing logs in it. What I want is
the program should terminate and the log4j UI should remain holding all
logs.
So how could I do that?
log4j.rootCategory=DEBUG, console, A
log4j.rootLogger=DEBUG, A
log4j.additivity.rootLogger=false
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.logger.com.psa=ERROR, console
log4j.logger.com.services=ERROR, console
log4j.logger.com.dbmigrate=DEBUG, console
log4j.logger.com.db.SQL=DEBUG, console
log4j.logger.org.apache.torque=ERROR, console
log4j.appender.A=org.apache.log4j.FileAppender
log4j.appender.A.File=/tmp/application.log
log4j.appender.A.layout=org.apache.log4j.PatternLayout
log4j.appender.A.layout.ConversionPattern=%-5p %.20c{2} %.10M (%F:%L) - %m
%n
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org
Re: Error in renaming the file During DailyRollover option
Posted by Ceki Gülcü <ce...@qos.ch>.
At 07:18 PM 3/7/2003 +0100, Jean-Noel WALLEZ wrote:
>Ceki ,
>
>first thanks for your support !
You are welcome. See comment below.
>I have try with log4j.debug=true
>but it doesn't work
>
>here is the output - everything seems ok, no?
>
>
>log4j:ERROR Failed to rename [../logs/conferences.log] to
>[../logs/conferences.log.2003-03-07-19-05].
>log4j: setFile called: ../logs/conferences.log, false
>log4j: setFile ended
>log4j:ERROR Failed to rename [../logs/conferences.log] to
>[../logs/conferences.log.2003-03-07-19-09].
From the above it looks like you do not have the required priviledges to
rename the file.
>log4j: setFile called: ../logs/conferences.log, false
>log4j: setFile ended
>log4j: Parsing for [root] with value=[DEBUG, rolling, smtp].
>log4j: Level token is [DEBUG].
>log4j: Category root set to DEBUG
>log4j: Parsing appender named "rolling".
>log4j: Parsing layout options for "rolling".
>log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} - %p %c -%m%n].
>log4j: End of parsing for "rolling".
>log4j: Setting property [datePattern] to [.yyyy-MM-dd-HH-mm].
>log4j: Setting property [file] to [../logs/conferences.log].
>log4j: setFile called: ../logs/conferences.log, true
>log4j: setFile ended
>log4j: Appender [rolling] to be rolled every minute.
>log4j: Parsed "rolling" options.
the configuration part worked ok. It's the actual renaming that failed...
>----- Original Message -----
>From: "Ceki Gülcü" <ce...@qos.ch>
>To: "Jean-Noel WALLEZ" <jn...@wavenet.be>
>Sent: Friday, March 07, 2003 2:14 PM
>Subject: Re: Error in renaming the file During DailyRollover option
>
>
> >
> > Can you please direct your question to log4j-user@jakarta.apache.org?
> >
> > I don't see anything wrong with your config file. Have you tried running
>it
> > with
> >
> > log4j.debug=true
> >
> > ?
--
Ceki
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org