AW: AW: Logging done in the wrong files

2009-09-17 Thread Bender Heri
Additivity flag has no effect on root logger since the root logger is the 
uppermost logger within the hierarchy. The flag is only meant for subordinated 
loggers (e.g. com.my.company. ...).

Do you have two log4j.jar in the same application? Each application needs only 
one (in WEB-INF/lib), and the parent classloader needs one (in common/lib).

You say that you use the same log.properties. Do you mean, you configure the 
same file names in two different applications? Therefore I guess you get the 
same entry from a common library class which is used by two different apps.

Or do you mean you see, e.g., an INFO statement in both the Logger_Debug.txt 
and the Logger_Info.txt? This would be normal according to your configuration.

Your copied config content is not complete. You reference an ERRRO_APPENDER 
which is not defined. Are you sure that there is no other logger declaration in 
your config file, without the additivity flag, but the same appenders? This 
would be the reason for having double log entries.

Please explain more accurate.

Heri


 

-Ursprüngliche Nachricht-
Von: S.Kannan [mailto:techy_k...@yahoo.co.in] 
Gesendet: Mittwoch, 16. September 2009 17:49
An: log4j-user@logging.apache.org
Betreff: Re: AW: Logging done in the wrong files


Infact i tried using 

log4j.rootLogger.additivity=false

but that has not solved the issue.
I guess that is not the correct solution..
Trying still..

Kannan.S



S.Kannan wrote:
 
 Bender
 
 I tried the first solution. With the same log.properties file i get 
 duplicate entries in the log files.
 Is it because there are two log4j.jar files  or any other issue
 
 log4j.threshold=ALL
 log4j.rootLogger=ALL,INFO_APPENDER,ERROR_APPENDER,DEBUG_APPENDER
 
 log4j.appender.DEBUG_APPENDER=org.apache.log4j.RollingFileAppender
 log4j.appender.DEBUG_APPENDER.MaxBackupIndex=50
 log4j.appender.DEBUG_APPENDER.MaxFileSize=10MB
 log4j.appender.DEBUG_APPENDER.file=data/tda/logs/Logger_Debug.txt
 log4j.appender.DEBUG_APPENDER.layout=org.apache.log4j.PatternLayout
 log4j.appender.DEBUG_APPENDER.layout.ConversionPattern=%d %-5p - %m%n 
 log4j.appender.DEBUG_APPENDER.Append=false
 log4j.appender.DEBUG_APPENDER.Threshold=DEBUG
  
 log4j.appender.INFO_APPENDER=org.apache.log4j.RollingFileAppender
 log4j.appender.INFO_APPENDER.MaxBackupIndex=50
 log4j.appender.INFO_APPENDER.MaxFileSize=10MB
 log4j.appender.INFO_APPENDER.file=data/tda/logs/Logger_Info.txt
 log4j.appender.INFO_APPENDER.layout=org.apache.log4j.PatternLayout
 log4j.appender.INFO_APPENDER.layout.ConversionPattern=%d %-5p - %m%n 
 log4j.appender.INFO_APPENDER.Append=false
 log4j.appender.INFO_APPENDER.Threshold=INFO
 
 Thanks,
 Kannan.S
 

--
View this message in context: 
http://www.nabble.com/Logging-done-in-the-wrong-files-tp25411329p25475242.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
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 done in the wrong files

2009-09-17 Thread yogesh kumar
HI ,

Actually , my problem is my log4j is not logging in a proper path, i.e its
not taking the path defined in log4j.properties file.i  have attached my
log4j.properties file , and we are using custom log4j and we have added in a
shared variable of WAS, all logs are getting in a WAS logs path with a short
names , and also timestamp attached in the logs are wrong,

Regards,
Yogesh



On Thu, Sep 17, 2009 at 12:16 PM, Bender Heri hben...@ergonomics.ch wrote:

 Additivity flag has no effect on root logger since the root logger is the
 uppermost logger within the hierarchy. The flag is only meant for
 subordinated loggers (e.g. com.my.company. ...).

 Do you have two log4j.jar in the same application? Each application needs
 only one (in WEB-INF/lib), and the parent classloader needs one (in
 common/lib).

 You say that you use the same log.properties. Do you mean, you configure
 the same file names in two different applications? Therefore I guess you get
 the same entry from a common library class which is used by two different
 apps.

 Or do you mean you see, e.g., an INFO statement in both the
 Logger_Debug.txt and the Logger_Info.txt? This would be normal according to
 your configuration.

 Your copied config content is not complete. You reference an ERRRO_APPENDER
 which is not defined. Are you sure that there is no other logger declaration
 in your config file, without the additivity flag, but the same appenders?
 This would be the reason for having double log entries.

 Please explain more accurate.

 Heri




 -Ursprüngliche Nachricht-
 Von: S.Kannan [mailto:techy_k...@yahoo.co.in]
 Gesendet: Mittwoch, 16. September 2009 17:49
 An: log4j-user@logging.apache.org
 Betreff: Re: AW: Logging done in the wrong files


 Infact i tried using

 log4j.rootLogger.additivity=false

 but that has not solved the issue.
 I guess that is not the correct solution..
 Trying still..

 Kannan.S



 S.Kannan wrote:
 
  Bender
 
  I tried the first solution. With the same log.properties file i get
  duplicate entries in the log files.
  Is it because there are two log4j.jar files  or any other issue
 
  log4j.threshold=ALL
  log4j.rootLogger=ALL,INFO_APPENDER,ERROR_APPENDER,DEBUG_APPENDER
 
  log4j.appender.DEBUG_APPENDER=org.apache.log4j.RollingFileAppender
  log4j.appender.DEBUG_APPENDER.MaxBackupIndex=50
  log4j.appender.DEBUG_APPENDER.MaxFileSize=10MB
  log4j.appender.DEBUG_APPENDER.file=data/tda/logs/Logger_Debug.txt
  log4j.appender.DEBUG_APPENDER.layout=org.apache.log4j.PatternLayout
  log4j.appender.DEBUG_APPENDER.layout.ConversionPattern=%d %-5p - %m%n
  log4j.appender.DEBUG_APPENDER.Append=false
  log4j.appender.DEBUG_APPENDER.Threshold=DEBUG
 
  log4j.appender.INFO_APPENDER=org.apache.log4j.RollingFileAppender
  log4j.appender.INFO_APPENDER.MaxBackupIndex=50
  log4j.appender.INFO_APPENDER.MaxFileSize=10MB
  log4j.appender.INFO_APPENDER.file=data/tda/logs/Logger_Info.txt
  log4j.appender.INFO_APPENDER.layout=org.apache.log4j.PatternLayout
  log4j.appender.INFO_APPENDER.layout.ConversionPattern=%d %-5p - %m%n
  log4j.appender.INFO_APPENDER.Append=false
  log4j.appender.INFO_APPENDER.Threshold=INFO
 
  Thanks,
  Kannan.S
 

 --
 View this message in context:
 http://www.nabble.com/Logging-done-in-the-wrong-files-tp25411329p25475242.html
 Sent from the Log4j - Users mailing list archive at Nabble.com.


 -
 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



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

AW: AW: Logging done in the wrong files

2009-09-17 Thread Bender Heri
Yogesh
Please do not bring another problem into this thread. This is only confusing. 
Start your own thread with a clear question.
BTW: you cannot attach files to this list. You have to copy the content into 
the mail itself.
Heri


Von: yogesh kumar [mailto:yog...@gmail.com]
Gesendet: Donnerstag, 17. September 2009 09:06
An: Log4J Users List
Betreff: Re: AW: Logging done in the wrong files

HI ,

Actually , my problem is my log4j is not logging in a proper path, i.e its not 
taking the path defined in log4j.properties file.i  have attached my 
log4j.properties file , and we are using custom log4j and we have added in a 
shared variable of WAS, all logs are getting in a WAS logs path with a short 
names , and also timestamp attached in the logs are wrong,

Regards,
Yogesh



On Thu, Sep 17, 2009 at 12:16 PM, Bender Heri 
hben...@ergonomics.chmailto:hben...@ergonomics.ch wrote:
Additivity flag has no effect on root logger since the root logger is the 
uppermost logger within the hierarchy. The flag is only meant for subordinated 
loggers (e.g. com.my.company. ...).

Do you have two log4j.jar in the same application? Each application needs only 
one (in WEB-INF/lib), and the parent classloader needs one (in common/lib).

You say that you use the same log.properties. Do you mean, you configure the 
same file names in two different applications? Therefore I guess you get the 
same entry from a common library class which is used by two different apps.

Or do you mean you see, e.g., an INFO statement in both the Logger_Debug.txt 
and the Logger_Info.txt? This would be normal according to your configuration.

Your copied config content is not complete. You reference an ERRRO_APPENDER 
which is not defined. Are you sure that there is no other logger declaration in 
your config file, without the additivity flag, but the same appenders? This 
would be the reason for having double log entries.

Please explain more accurate.

Heri




-Ursprüngliche Nachricht-
Von: S.Kannan [mailto:techy_k...@yahoo.co.inmailto:techy_k...@yahoo.co.in]
Gesendet: Mittwoch, 16. September 2009 17:49
An: log4j-user@logging.apache.orgmailto:log4j-user@logging.apache.org
Betreff: Re: AW: Logging done in the wrong files


Infact i tried using

log4j.rootLogger.additivity=false

but that has not solved the issue.
I guess that is not the correct solution..
Trying still..

Kannan.S



S.Kannan wrote:

 Bender

 I tried the first solution. With the same log.properties file i get
 duplicate entries in the log files.
 Is it because there are two log4j.jar files  or any other issue

 log4j.threshold=ALL
 log4j.rootLogger=ALL,INFO_APPENDER,ERROR_APPENDER,DEBUG_APPENDER

 log4j.appender.DEBUG_APPENDER=org.apache.log4j.RollingFileAppender
 log4j.appender.DEBUG_APPENDER.MaxBackupIndex=50
 log4j.appender.DEBUG_APPENDER.MaxFileSize=10MB
 log4j.appender.DEBUG_APPENDER.file=data/tda/logs/Logger_Debug.txt
 log4j.appender.DEBUG_APPENDER.layout=org.apache.log4j.PatternLayout
 log4j.appender.DEBUG_APPENDER.layout.ConversionPattern=%d %-5p - %m%n
 log4j.appender.DEBUG_APPENDER.Append=false
 log4j.appender.DEBUG_APPENDER.Threshold=DEBUG

 log4j.appender.INFO_APPENDER=org.apache.log4j.RollingFileAppender
 log4j.appender.INFO_APPENDER.MaxBackupIndex=50
 log4j.appender.INFO_APPENDER.MaxFileSize=10MB
 log4j.appender.INFO_APPENDER.file=data/tda/logs/Logger_Info.txt
 log4j.appender.INFO_APPENDER.layout=org.apache.log4j.PatternLayout
 log4j.appender.INFO_APPENDER.layout.ConversionPattern=%d %-5p - %m%n
 log4j.appender.INFO_APPENDER.Append=false
 log4j.appender.INFO_APPENDER.Threshold=INFO

 Thanks,
 Kannan.S


--
View this message in context: 
http://www.nabble.com/Logging-done-in-the-wrong-files-tp25411329p25475242.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


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




Log4j.appender is not working

2009-09-17 Thread yogesh kumar
HI ,
Actually , my problem is my log4j is not logging in a proper path, i.e its
not taking the path defined in log4j.properties file.i  have attached my
log4j.properties file , and we are using custom log4j and we have added in a
shared variable of WAS, all logs are getting in a WAS logs path with a short
names , and also timestamp attached in the logs are wrong,

my Log4j.propertis file content:

log4j.logger.default=DEBUG,defaultlog^M
log4j.appender.defaultlog=org.apache.log4j.RollingFileAppender^M
log4j.appender.defaultlog.layout=org.apache.log4j.PatternLayout^M
log4j.appender.defaultlog.layout.ConversionPattern=%d{dd MMM  HH:mm:ss}
%5p [%t] %m%n^M
log4j.appender.defaultlog.File=/usr/WebSphere602/logs/pmt/default_WPS.log^M
log4j.appender.defaultlog.MaxFileSize=4096KB^M
log4j.appender.defaultlog.MaxBackupIndex=10^M
^M
#^M
# IL1^M
#^M
log4j.logger.il1=DEBUG,il1log^M
log4j.appender.il1log=org.apache.log4j.RollingFileAppender^M
log4j.appender.il1log.layout=org.apache.log4j.PatternLayout^M
log4j.appender.il1log.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p
[%t] %m%n^M
log4j.appender.il1log.File=/usr/WebSphere602/logs/pmt/il1_ServiceRequest_WPS.log^M
log4j.appender.il1log.MaxFileSize=4096KB^M
log4j.appender.il1log.MaxBackupIndex=10^M
^M
#^M
# S1^M
#^M
log4j.logger.s1=DEBUG,s1log^M
log4j.appender.s1log=org.apache.log4j.RollingFileAppender^M
log4j.appender.s1log.layout=org.apache.log4j.PatternLayout^M
log4j.appender.s1log.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p
[%t] %m%n^M
log4j.appender.s1log.File=/usr/WebSphere602/logs/pmt/S1_TransactionEventLogger_WPS.log^M
log4j.appender.s1log.MaxFileSize=4096KB^M
log4j.appender.s1log.MaxBackupIndex=10^M
^M
#^M
# S2^M
#^M
log4j.logger.s2=DEBUG,s2log^M
log4j.appender.s2log=org.apache.log4j.RollingFileAppender^M
log4j.appender.s2log.layout=org.apache.log4j.PatternLayout^M
log4j.appender.s2log.layout.ConversionPattern=%d{dd MMM  HH:mm:ss} %5p
[%t] %m%n^M
log4j.appender.s2log.File=/usr/WebSphere602/logs/pmt/S2_ManageTransactions_WPS.log^M
log4j.appender.s2log.MaxFileSize=4096KB^M
log4j.appender.s2log.MaxBackupIndex=10^M

Rgeads,
Yogesh