Re: AW: Logging issue with logginf to seperate log files

2009-02-26 Thread dirk ooms
Santhoo,

I believe the problem is caused by the restart at midnight.
DailyRollingFileAppender will trigger the rollover when a log event has
a different date than the previous log event, but because of the restart
at midnight, the first log event can't compare with a previous log event
and just continues writing in the log file of the previous day.

dirk

On Thu, 2009-02-26 at 01:04 -0800, Santhoo Kumar wrote:
> Hai,
> 
> i'm new to log4j, i found some xml configuration and try that stuff, it is 
> working fine 
> but i have some problem with DailyRollingFileAppender it is not keeping 
> previous files, my system is restrat services at night 12:00 clock, on that 
> time it overwrites the existing file for this what i have to do. just suggest 
> me in this case.
> 
> 
> Regards,
> Santhoo
> 
> --- On Wed, 2/25/09, Bender Heri  wrote:
> From: Bender Heri 
> Subject: AW: Logging issue with logginf to seperate log files
> To: "Log4J Users List" 
> Date: Wednesday, February 25, 2009, 10:48 AM
> 
> The config file seems to be OK (BTW: You should use the tag "logger"
> instead of "category" which is deprecated).
> How do you fetch the logger instance in LoadCommonData? You should use
> "Logger.getLogger( LoadCommonData.class )".
> 
> For debugging log4j, add the attribute debug to the root tag:
>  xmlns:log4j="http://jakarta.apache.org/log4j/";
> debug="true">
> 
> Or you can supply a command line argument when starting the app:
> "-Dlog4j.debug" for getting additinal infos how log4j is configured.
> 
> Heri
> 
> -Ursprüngliche Nachricht-
> Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] 
> Gesendet: Montag, 23. Februar 2009 21:59
> An: Log4J Users List
> Betreff: Logging issue with logginf to seperate log files
> 
> HiI have a web application where the class structure is as below
> 
> com.test.myproject.common
> 
> I have a class under package common, i want to print all the logs from this 
> log
> file to a separate log file, so i defined log4j.xml file as below.
> 
> For some reason all the logs are logged in log4jXml.xml and in STDOUT, but log
> file StartUpInfo.log is empty
> 
> what am i doing wrong, is there a way to debug log4j itself
> 
>  class="org.apache.log4j.DailyRollingFileAppender">
> 
>  />  class="org.apache.log4j.xml.XMLLayout">
> 
> 
>  class="org.apache.log4j.FileAppender">
> 
> 
>  value="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> 
> 
> 
>  class="org.apache.log4j.ConsoleAppender">
> 
>  value="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> 
> 
> 
> 
> 
> 
> 
> 
>  additivity="false">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
> 
> 
>   


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: AW: Logging issue with logginf to seperate log files

2009-02-26 Thread Santhoo Kumar
hai,
  Joe White

This is my configuration settings what is the problem just suggest me



http://jakarta.apache.org/log4j/"; 
debug="true">





































Regards,
Santhoo



--- On Thu, 2/26/09, Joe White  wrote:
From: Joe White 
Subject: Re: AW: Logging issue with logginf to seperate log files
To: santhoo...@yahoo.com
Cc: "Log4J Users List" , hben...@ergonomics.ch
Date: Thursday, February 26, 2009, 9:18 AM


  Do you have ?

log4j.appender.file.maxBackupIndex=3

  where 3 is the amount of files to keep?

  or ?

  

  Quoting Santhoo Kumar :

> Hai,
> 
> i'm new to log4j, i found some xml configuration and try that stuff, 
it is working fine
> but i have some problem with DailyRollingFileAppender it is not  keeping
previous files, my system is restrat services at night 12:00  clock, on that
time it overwrites the existing file for this what i  have to do. just suggest
me in this case.
> 
> 
> Regards,
> Santhoo
> 
> --- On Wed, 2/25/09, Bender Heri  wrote:
> From: Bender Heri 
> Subject: AW: Logging issue with logginf to seperate log files
> To: "Log4J Users List" 
> Date: Wednesday, February 25, 2009, 10:48 AM
> 
> The config file seems to be OK (BTW: You should use the tag
"logger"
> instead of "category" which is deprecated).
> How do you fetch the logger instance in LoadCommonData? You should use
> "Logger.getLogger( LoadCommonData.class )".
> 
> For debugging log4j, add the attribute debug to the root tag:
>  xmlns:log4j="http://jakarta.apache.org/log4j/";
> debug="true">
> 
> Or you can supply a command line argument when starting the app:
> "-Dlog4j.debug" for getting additinal infos how log4j is
configured.
> 
> Heri
> 
> -Ursprüngliche Nachricht-
> Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
> Gesendet: Montag, 23. Februar 2009 21:59
> An: Log4J Users List
> Betreff: Logging issue with logginf to seperate log files
> 
> HiI have a web application where the class structure is as below
> 
> com.test.myproject.common
> 
> I have a class under package common, i want to print all the logs  from
this log
> file to a separate log file, so i defined log4j.xml file as below.
> 
> For some reason all the logs are logged in log4jXml.xml and in  STDOUT,
but log
> file StartUpInfo.log is empty
> 
> what am i doing wrong, is there a way to debug log4j itself
> 
>  class="org.apache.log4j.DailyRollingFileAppender">
> 
>  />  class="org.apache.log4j.xml.XMLLayout">
> 
> 
>  class="org.apache.log4j.FileAppender">
> 
> 
>  value="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> 
> 
> 
>  class="org.apache.log4j.ConsoleAppender">
> 
>  value="%d %-5p [%t] %C{2} (%F:%L) - %m%n" /> 
> 
> 
> 
> 
> 
> 
> 
>  additivity="false">
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
> 
> 
> 
> 

  --
"We are what we repeatedly do. Excellence, then, is not an act, but a
habit."
Aristotle



  

Re: AW: Logging issue with logginf to seperate log files

2009-02-26 Thread Joe White



  Do you have ?

log4j.appender.file.maxBackupIndex=3

  where 3 is the amount of files to keep?

  or ?

  

  Quoting Santhoo Kumar :


Hai,

i'm new to log4j, i found some xml configuration and try that  
stuff,  it is working fine
but i have some problem with DailyRollingFileAppender it is not   
keeping previous files, my system is restrat services at night  
12:00  clock, on that time it overwrites the existing file for this  
what i  have to do. just suggest me in this case.



Regards,
Santhoo

--- On Wed, 2/25/09, Bender Heri  wrote:
From: Bender Heri 
Subject: AW: Logging issue with logginf to seperate log files
To: "Log4J Users List" 
Date: Wednesday, February 25, 2009, 10:48 AM

The config file seems to be OK (BTW: You should use the tag "logger"
instead of "category" which is deprecated).
How do you fetch the logger instance in LoadCommonData? You should use
"Logger.getLogger( LoadCommonData.class )".

For debugging log4j, add the attribute debug to the root tag:
http://jakarta.apache.org/log4j/";
debug="true">

Or you can supply a command line argument when starting the app:
"-Dlog4j.debug" for getting additinal infos how log4j is configured.

Heri

-Ursprüngliche Nachricht-
Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
Gesendet: Montag, 23. Februar 2009 21:59
An: Log4J Users List
Betreff: Logging issue with logginf to seperate log files

HiI have a web application where the class structure is as below

com.test.myproject.common

I have a class under package common, i want to print all the logs   
from this log

file to a separate log file, so i defined log4j.xml file as below.

For some reason all the logs are logged in log4jXml.xml and in   
STDOUT, but log

file StartUpInfo.log is empty

what am i doing wrong, is there a way to debug log4j itself



 





 




 


















-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org







  --
"We are what we repeatedly do. Excellence, then, is not an act, but a habit."
Aristotle


Re: AW: Logging issue with logginf to seperate log files

2009-02-26 Thread Santhoo Kumar
Hai,

i'm new to log4j, i found some xml configuration and try that stuff, it is 
working fine 
but i have some problem with DailyRollingFileAppender it is not keeping 
previous files, my system is restrat services at night 12:00 clock, on that 
time it overwrites the existing file for this what i have to do. just suggest 
me in this case.


Regards,
Santhoo

--- On Wed, 2/25/09, Bender Heri  wrote:
From: Bender Heri 
Subject: AW: Logging issue with logginf to seperate log files
To: "Log4J Users List" 
Date: Wednesday, February 25, 2009, 10:48 AM

The config file seems to be OK (BTW: You should use the tag "logger"
instead of "category" which is deprecated).
How do you fetch the logger instance in LoadCommonData? You should use
"Logger.getLogger( LoadCommonData.class )".

For debugging log4j, add the attribute debug to the root tag:
http://jakarta.apache.org/log4j/";
debug="true">

Or you can supply a command line argument when starting the app:
"-Dlog4j.debug" for getting additinal infos how log4j is configured.

Heri

-Ursprüngliche Nachricht-
Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] 
Gesendet: Montag, 23. Februar 2009 21:59
An: Log4J Users List
Betreff: Logging issue with logginf to seperate log files

HiI have a web application where the class structure is as below

com.test.myproject.common

I have a class under package common, i want to print all the logs from this log
file to a separate log file, so i defined log4j.xml file as below.

For some reason all the logs are logged in log4jXml.xml and in STDOUT, but log
file StartUpInfo.log is empty

what am i doing wrong, is there a way to debug log4j itself



 





 




 


















-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org




  

AW: Logging issue with logginf to seperate log files

2009-02-25 Thread Bender Heri
The config file seems to be OK (BTW: You should use the tag "logger" instead of 
"category" which is deprecated).
How do you fetch the logger instance in LoadCommonData? You should use 
"Logger.getLogger( LoadCommonData.class )".

For debugging log4j, add the attribute debug to the root tag:
http://jakarta.apache.org/log4j/"; 
debug="true">

Or you can supply a command line argument when starting the app: 
"-Dlog4j.debug" for getting additinal infos how log4j is configured.

Heri

-Ursprüngliche Nachricht-
Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com] 
Gesendet: Montag, 23. Februar 2009 21:59
An: Log4J Users List
Betreff: Logging issue with logginf to seperate log files

HiI have a web application where the class structure is as below

com.test.myproject.common

I have a class under package common, i want to print all the logs from this log 
file to a separate log file, so i defined log4j.xml file as below.

For some reason all the logs are logged in log4jXml.xml and in STDOUT, but log 
file StartUpInfo.log is empty

what am i doing wrong, is there a way to debug log4j itself


  



 
  



  

















-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org