RE: Updating Wrong File

2007-04-11 Thread Jacob Kjome
Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>:
>
> It sounds like it would be easier to change over to child-first class
> loading.  Is that bad in Weblogic?
>

I'm not sure whether or not it would be bad?  However, in my experience, the
default behavior is likely to work a bit better than optional stuff since the
default behavior is far better tested, not only by Weblogic themselves but by
their users.

Check the Weblogic docs on how to enable child-first, or parent-last,
classloading.  You can try it out.  If nothing breaks, you're golden.  If
something breaks, try using a repository selector based on JNDI.  See another
thread on the user list for an explanation of how to use the one in Log4j-1.3
(though I'm not advocating moving permanently to 1.3, only to try it out to see
if the ContextJNDISelector works.  Then you can modify it to work for 1.2).

Jake

> Eric Wolf
>
>
> Jacob Kjome <[EMAIL PROTECTED]> wrote on 04/11/2007 09:54:39 AM:
>
> >
> > Weblogic does not implement child-first classloading by default.  This
> means
> > that if there is a log4j.jar in the server classpath, or even in the EAR
> > containing one more more WARS (with each WAR having it's own log4j.jar),
> the
> > log4j.jar in the parent classloader will be used instead of the one in
> > WEB-INF/lib.
> >
> > Your only recourse in this situation is to use a repository selector.
> >
> > Jake
> >
> > Quoting Prashant Saraf <[EMAIL PROTECTED]>:
> >
> > > I did that still not working...
> > >
> > >
> > > Thanks and Regards
> > > प्रशांत सराफ
> > > (Prashant Saraf)
> > > SE-I
> > > Cross Country Infotech
> > > Ext : 72543
> > > -Original Message-
> > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, April 10, 2007 9:50 PM
> > > To: Log4J Users List
> > > Subject: Re: Updating Wrong File
> > >
> > >
> > >
> > >
> > >
> > > Try putting the log4j JAR file in each of the application's WEB-INF/lib
> > > directory so each application will have its own version to initialize.
> I
> > > ran into this when I tried to put the log4j JAR file in a shared
> library
> > > and another application got "confused" on where to log.  I put it back
> in
> > > my application and it has been fine.
> > >
> > > Eric Wolf
> > >
> > >
> > >
> > >
> > >  "Prashant Saraf"
> > >  <[EMAIL PROTECTED]>
> > >
> To
> > >  04/10/2007 12:53  "Log4J Users List"
> > >  AM
> > >
> cc
> > >
> > >  Please respond to
> Topic
> > >"Log4J Users
> > >List"
> Subject
> > >  <[EMAIL PROTECTED] Updating Wrong File
> > >   ng.apache.org>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi all I am new to Log4j.
> > >
> > >   I had an issue. I am using Weblogic 8.1, I had two
> > > application both had their log4j File. Now what is happing is
> > > applicationA  is running properly with log4j. When I hit ApplicationB
> it
> > > also works proper, Now when I hit applicationA it show me logged in
> > > ApplicationB
> > >
> > >
> > >
> > > ApplicationA log4j properties file
> > >
> > >
> > >
> > > # Set root logger level to DEBUG and its only appender to A1.
> > >
> > > log4j.rootLogger=WARN,A1, F1
> > >
> > >
> > >
> > > log4j.category.org.apache.struts=WARN
> > >
> > > log4j.category.org.apache.commons.logging=WARN
> > >
> > > log4j.category. APPA =DEBUG
> > >
> > > # A1 is set to be a ConsoleAppender.
> > >
> > > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> > >
> > > # A1 uses PatternLayout.
> > >
> > > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> > >
> > > #log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n
> > >
> > > log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
> > > %m%n
> > >
> > > # F1 is set to be a FileAppender.
&g

RE: Updating Wrong File

2007-04-11 Thread Eric . Wolf




It sounds like it would be easier to change over to child-first class
loading.  Is that bad in Weblogic?

Eric Wolf


Jacob Kjome <[EMAIL PROTECTED]> wrote on 04/11/2007 09:54:39 AM:

>
> Weblogic does not implement child-first classloading by default.  This
means
> that if there is a log4j.jar in the server classpath, or even in the EAR
> containing one more more WARS (with each WAR having it's own log4j.jar),
the
> log4j.jar in the parent classloader will be used instead of the one in
> WEB-INF/lib.
>
> Your only recourse in this situation is to use a repository selector.
>
> Jake
>
> Quoting Prashant Saraf <[EMAIL PROTECTED]>:
>
> > I did that still not working...
> >
> >
> > Thanks and Regards
> > प्रशांत सराफ
> > (Prashant Saraf)
> > SE-I
> > Cross Country Infotech
> > Ext : 72543
> > -Original Message-
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 10, 2007 9:50 PM
> > To: Log4J Users List
> > Subject: Re: Updating Wrong File
> >
> >
> >
> >
> >
> > Try putting the log4j JAR file in each of the application's WEB-INF/lib
> > directory so each application will have its own version to initialize.
I
> > ran into this when I tried to put the log4j JAR file in a shared
library
> > and another application got "confused" on where to log.  I put it back
in
> > my application and it has been fine.
> >
> > Eric Wolf
> >
> >
> >
> >
> >  "Prashant Saraf"
> >  <[EMAIL PROTECTED]>
> >
To
> >  04/10/2007 12:53  "Log4J Users List"
> >  AM
> >
cc
> >
> >  Please respond to
Topic
> >"Log4J Users
> >List"
Subject
> >  <[EMAIL PROTECTED] Updating Wrong File
> >   ng.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Hi all I am new to Log4j.
> >
> >   I had an issue. I am using Weblogic 8.1, I had two
> > application both had their log4j File. Now what is happing is
> > applicationA  is running properly with log4j. When I hit ApplicationB
it
> > also works proper, Now when I hit applicationA it show me logged in
> > ApplicationB
> >
> >
> >
> > ApplicationA log4j properties file
> >
> >
> >
> > # Set root logger level to DEBUG and its only appender to A1.
> >
> > log4j.rootLogger=WARN,A1, F1
> >
> >
> >
> > log4j.category.org.apache.struts=WARN
> >
> > log4j.category.org.apache.commons.logging=WARN
> >
> > log4j.category. APPA =DEBUG
> >
> > # A1 is set to be a ConsoleAppender.
> >
> > log4j.appender.A1=org.apache.log4j.ConsoleAppender
> >
> > # A1 uses PatternLayout.
> >
> > log4j.appender.A1.layout=org.apache.log4j.PatternLayout
> >
> > #log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n
> >
> > log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
> > %m%n
> >
> > # F1 is set to be a FileAppender.
> >
> > log4j.appender.F1=org.apache.log4j.RollingFileAppender
> >
> > log4j.appender.F1.file=c:/logs/APPA.log
> >
> > log4j.appender.F1.MaxFileSize=1KB
> >
> > log4j.appender.F1.MaxBackupIndex=5
> >
> > # F1 uses PatternLayout.
> >
> > log4j.appender.F1.layout=org.apache.log4j.PatternLayout
> >
> > #log4j.appender.F1.layout.ConversionPattern=%5p [%t] - %m%n
> >
> > log4j.appender.F1.layout.ConversionPattern=%5p [%d{HH:mm:ss}] - %m%n
> >
> >
> >
> > ApplicationB log4j properties file
> >
> > # * Set root logger level to ERROR and its two appenders to stdout
> > and R.
> >
> > log4j.rootLogger=debug, R
> >
> >
> >
> > # * stdout is set to be a ConsoleAppender.
> >
> > log4j.appender.stdout=org.apache.log4j.ConsoleAppender
> >
> > # * stdout uses PatternLayout.
> >
> > 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=org.apache.log4j.ConsoleAppender
> >
> > log4j.appender.s

RE: Updating Wrong File

2007-04-11 Thread Eric . Wolf




I have not seen the below 2 lines in Log4j.  I didn't know some Struts
classes were for Log4j.

log4j.category.org.apache.struts=WARN
log4j.category.org.apache.commons.logging=WARN

Below is a piece of my config file that works.

log4j.rootLogger=debug, CONSOLE, ROLLING

# CONSOLE is set to be a ConsoleAppender which outputs to the web server
console
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%n### KIDS
[%d{ISO8601}]%8.8p: %30.50c{6} -- %x%n  ### Log Message: %m%n

# ROLLING is a RollingFileAppender that outputs to a rolling log file
called kids_rolling_log
log4j.appender.ROLLING=org.apache.log4j.RollingFileAppender
log4j.appender.ROLLING.File=
/apps/ln003dv/server1/kids/logs/kids_rolling_log
log4j.appender.ROLLING.layout=org.apache.log4j.PatternLayout
log4j.appender.ROLLING.layout.ConversionPattern=[%d{ISO8601}]%8.8p: %30.36
c{4} -- %x%n  ### Log Message: %m%n

# Set the max size of the file, the number of backup files and logging
threshold
log4j.appender.ROLLING.MaxFileSize=10MB
log4j.appender.ROLLING.MaxBackupIndex=10
log4j.appender.ROLLING.Threshold=DEBUG

Hope this helps,
Eric Wolf


"Prashant Saraf" <[EMAIL PROTECTED]> wrote on 04/11/2007 06:19:35 AM:

> I did that still not working...
>
>
> Thanks and Regards
> प्रशांत सराफ
> (Prashant Saraf)
> SE-I
> Cross Country Infotech
> Ext : 72543
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 9:50 PM
> To: Log4J Users List
> Subject: Re: Updating Wrong File
>
>
>
>
>
> Try putting the log4j JAR file in each of the application's WEB-INF/lib
> directory so each application will have its own version to initialize.  I
> ran into this when I tried to put the log4j JAR file in a shared library
> and another application got "confused" on where to log.  I put it back in
> my application and it has been fine.
>
> Eric Wolf
>
>
>
>

>  "Prashant Saraf"

>  <[EMAIL PROTECTED]>

>
To
>  04/10/2007 12:53  "Log4J Users List"

>  AM

>
cc
>

>  Please respond to
Topic
>"Log4J Users

>List"
Subject
>  <[EMAIL PROTECTED] Updating Wrong File

>   ng.apache.org>

>

>

>

>

>

>
>
>
>
> Hi all I am new to Log4j.
>
>   I had an issue. I am using Weblogic 8.1, I had two
> application both had their log4j File. Now what is happing is
> applicationA  is running properly with log4j. When I hit ApplicationB it
> also works proper, Now when I hit applicationA it show me logged in
> ApplicationB
>
>
>
> ApplicationA log4j properties file
>
>
>
> # Set root logger level to DEBUG and its only appender to A1.
>
> log4j.rootLogger=WARN,A1, F1
>
>
>
> log4j.category.org.apache.struts=WARN
>
> log4j.category.org.apache.commons.logging=WARN
>
> log4j.category. APPA =DEBUG
>
> # A1 is set to be a ConsoleAppender.
>
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> # A1 uses PatternLayout.
>
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> #log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n
>
> log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
> %m%n
>
> # F1 is set to be a FileAppender.
>
> log4j.appender.F1=org.apache.log4j.RollingFileAppender
>
> log4j.appender.F1.file=c:/logs/APPA.log
>
> log4j.appender.F1.MaxFileSize=1KB
>
> log4j.appender.F1.MaxBackupIndex=5
>
> # F1 uses PatternLayout.
>
> log4j.appender.F1.layout=org.apache.log4j.PatternLayout
>
> #log4j.appender.F1.layout.ConversionPattern=%5p [%t] - %m%n
>
> log4j.appender.F1.layout.ConversionPattern=%5p [%d{HH:mm:ss}] - %m%n
>
>
>
> ApplicationB log4j properties file
>
> # * Set root logger level to ERROR and its two appenders to stdout
> and R.
>
> log4j.rootLogger=debug, R
>
>
>
> # * stdout is set to be a ConsoleAppender.
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>
> # * stdout uses PatternLayout.
>
> 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=org.apache.log4j.ConsoleAppender
>
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
>
>
> # * R is set to be a RollingFileAppender.
>
&

RE: Updating Wrong File

2007-04-11 Thread Jacob Kjome

Weblogic does not implement child-first classloading by default.  This means
that if there is a log4j.jar in the server classpath, or even in the EAR
containing one more more WARS (with each WAR having it's own log4j.jar), the
log4j.jar in the parent classloader will be used instead of the one in
WEB-INF/lib.

Your only recourse in this situation is to use a repository selector.

Jake

Quoting Prashant Saraf <[EMAIL PROTECTED]>:

> I did that still not working...
>
>
> Thanks and Regards
> प्रशांत सराफ
> (Prashant Saraf)
> SE-I
> Cross Country Infotech
> Ext : 72543
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 10, 2007 9:50 PM
> To: Log4J Users List
> Subject: Re: Updating Wrong File
>
>
>
>
>
> Try putting the log4j JAR file in each of the application's WEB-INF/lib
> directory so each application will have its own version to initialize.  I
> ran into this when I tried to put the log4j JAR file in a shared library
> and another application got "confused" on where to log.  I put it back in
> my application and it has been fine.
>
> Eric Wolf
>
>
>
>
>  "Prashant Saraf"
>  <[EMAIL PROTECTED]>
> To
>  04/10/2007 12:53  "Log4J Users List"
>  AM
> cc
>
>  Please respond to   Topic
>"Log4J Users
>List"   Subject
>  <[EMAIL PROTECTED] Updating Wrong File
>   ng.apache.org>
>
>
>
>
>
>
>
>
>
> Hi all I am new to Log4j.
>
>   I had an issue. I am using Weblogic 8.1, I had two
> application both had their log4j File. Now what is happing is
> applicationA  is running properly with log4j. When I hit ApplicationB it
> also works proper, Now when I hit applicationA it show me logged in
> ApplicationB
>
>
>
> ApplicationA log4j properties file
>
>
>
> # Set root logger level to DEBUG and its only appender to A1.
>
> log4j.rootLogger=WARN,A1, F1
>
>
>
> log4j.category.org.apache.struts=WARN
>
> log4j.category.org.apache.commons.logging=WARN
>
> log4j.category. APPA =DEBUG
>
> # A1 is set to be a ConsoleAppender.
>
> log4j.appender.A1=org.apache.log4j.ConsoleAppender
>
> # A1 uses PatternLayout.
>
> log4j.appender.A1.layout=org.apache.log4j.PatternLayout
>
> #log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n
>
> log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
> %m%n
>
> # F1 is set to be a FileAppender.
>
> log4j.appender.F1=org.apache.log4j.RollingFileAppender
>
> log4j.appender.F1.file=c:/logs/APPA.log
>
> log4j.appender.F1.MaxFileSize=1KB
>
> log4j.appender.F1.MaxBackupIndex=5
>
> # F1 uses PatternLayout.
>
> log4j.appender.F1.layout=org.apache.log4j.PatternLayout
>
> #log4j.appender.F1.layout.ConversionPattern=%5p [%t] - %m%n
>
> log4j.appender.F1.layout.ConversionPattern=%5p [%d{HH:mm:ss}] - %m%n
>
>
>
> ApplicationB log4j properties file
>
> # * Set root logger level to ERROR and its two appenders to stdout
> and R.
>
> log4j.rootLogger=debug, R
>
>
>
> # * stdout is set to be a ConsoleAppender.
>
> log4j.appender.stdout=org.apache.log4j.ConsoleAppender
>
> # * stdout uses PatternLayout.
>
> 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=org.apache.log4j.ConsoleAppender
>
> log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
>
>
>
> # * R is set to be a RollingFileAppender.
>
> log4j.appender.R=org.apache.log4j.RollingFileAppender
>
> log4j.appender.R.File=c:/logs/APPB.log
>
> # * Max file size is set to 1KB
>
> log4j.appender.R.MaxFileSize=1KB
>
> # * Keep one backup file
>
> log4j.appender.R.MaxBackupIndex=1
>
> # * R uses PatternLayout.
>
> log4j.appender.R.layout=org.apache.log4j.PatternLayout
>
> log4j.appender.R.layout.ConversionPattern=[%d{MM-dd- HH:mm:ss}] %p -
> %m%n
>
>
>
> # Set Struts/Commons log level
>
> log4j.logger.org.apache.struts=WARN
>
> log4j.logger.org.apache.commons=WARN
>
> Thanks and Regards
> Prashant Saraf
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Updating Wrong File

2007-04-11 Thread Prashant Saraf
I did that still not working...


Thanks and Regards
प्रशांत सराफ
(Prashant Saraf)
SE-I
Cross Country Infotech
Ext : 72543
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 9:50 PM
To: Log4J Users List
Subject: Re: Updating Wrong File





Try putting the log4j JAR file in each of the application's WEB-INF/lib
directory so each application will have its own version to initialize.  I
ran into this when I tried to put the log4j JAR file in a shared library
and another application got "confused" on where to log.  I put it back in
my application and it has been fine.

Eric Wolf



   
 "Prashant Saraf"  
 <[EMAIL PROTECTED]> 
To 
 04/10/2007 12:53  "Log4J Users List"  
 AM 
cc 
   
 Please respond to   Topic 
   "Log4J Users
   List"   Subject 
 <[EMAIL PROTECTED] Updating Wrong File 
  ng.apache.org>   
   
   
   
   
   




Hi all I am new to Log4j.

  I had an issue. I am using Weblogic 8.1, I had two
application both had their log4j File. Now what is happing is
applicationA  is running properly with log4j. When I hit ApplicationB it
also works proper, Now when I hit applicationA it show me logged in
ApplicationB



ApplicationA log4j properties file



# Set root logger level to DEBUG and its only appender to A1.

log4j.rootLogger=WARN,A1, F1



log4j.category.org.apache.struts=WARN

log4j.category.org.apache.commons.logging=WARN

log4j.category. APPA =DEBUG

# A1 is set to be a ConsoleAppender.

log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.

log4j.appender.A1.layout=org.apache.log4j.PatternLayout

#log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n

log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
%m%n

# F1 is set to be a FileAppender.

log4j.appender.F1=org.apache.log4j.RollingFileAppender

log4j.appender.F1.file=c:/logs/APPA.log

log4j.appender.F1.MaxFileSize=1KB

log4j.appender.F1.MaxBackupIndex=5

# F1 uses PatternLayout.

log4j.appender.F1.layout=org.apache.log4j.PatternLayout

#log4j.appender.F1.layout.ConversionPattern=%5p [%t] - %m%n

log4j.appender.F1.layout.ConversionPattern=%5p [%d{HH:mm:ss}] - %m%n



ApplicationB log4j properties file

# * Set root logger level to ERROR and its two appenders to stdout
and R.

log4j.rootLogger=debug, R



# * stdout is set to be a ConsoleAppender.

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

# * stdout uses PatternLayout.

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=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout



# * R is set to be a RollingFileAppender.

log4j.appender.R=org.apache.log4j.RollingFileAppender

log4j.appender.R.File=c:/logs/APPB.log

# * Max file size is set to 1KB

log4j.appender.R.MaxFileSize=1KB

# * Keep one backup file

log4j.appender.R.MaxBackupIndex=1

# * R uses PatternLayout.

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=[%d{MM-dd- HH:mm:ss}] %p -
%m%n



# Set Struts/Commons log level

log4j.logger.org.apache.struts=WARN

log4j.logger.org.apache.commons=WARN

Thanks and Regards
Prashant Saraf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: Updating Wrong File

2007-04-10 Thread Eric . Wolf




Try putting the log4j JAR file in each of the application's WEB-INF/lib
directory so each application will have its own version to initialize.  I
ran into this when I tried to put the log4j JAR file in a shared library
and another application got "confused" on where to log.  I put it back in
my application and it has been fine.

Eric Wolf



   
 "Prashant Saraf"  
 <[EMAIL PROTECTED]> 
To 
 04/10/2007 12:53  "Log4J Users List"  
 AM 
cc 
   
 Please respond to   Topic 
   "Log4J Users
   List"   Subject 
 <[EMAIL PROTECTED] Updating Wrong File 
  ng.apache.org>   
   
   
   
   
   




Hi all I am new to Log4j.

  I had an issue. I am using Weblogic 8.1, I had two
application both had their log4j File. Now what is happing is
applicationA  is running properly with log4j. When I hit ApplicationB it
also works proper, Now when I hit applicationA it show me logged in
ApplicationB



ApplicationA log4j properties file



# Set root logger level to DEBUG and its only appender to A1.

log4j.rootLogger=WARN,A1, F1



log4j.category.org.apache.struts=WARN

log4j.category.org.apache.commons.logging=WARN

log4j.category. APPA =DEBUG

# A1 is set to be a ConsoleAppender.

log4j.appender.A1=org.apache.log4j.ConsoleAppender

# A1 uses PatternLayout.

log4j.appender.A1.layout=org.apache.log4j.PatternLayout

#log4j.appender.A1.layout.ConversionPattern=%5p [%t] - %m%n

log4j.appender.A1.layout.ConversionPattern= APPA >%5p [%d{HH:mm:ss}] -
%m%n

# F1 is set to be a FileAppender.

log4j.appender.F1=org.apache.log4j.RollingFileAppender

log4j.appender.F1.file=c:/logs/APPA.log

log4j.appender.F1.MaxFileSize=1KB

log4j.appender.F1.MaxBackupIndex=5

# F1 uses PatternLayout.

log4j.appender.F1.layout=org.apache.log4j.PatternLayout

#log4j.appender.F1.layout.ConversionPattern=%5p [%t] - %m%n

log4j.appender.F1.layout.ConversionPattern=%5p [%d{HH:mm:ss}] - %m%n



ApplicationB log4j properties file

# * Set root logger level to ERROR and its two appenders to stdout
and R.

log4j.rootLogger=debug, R



# * stdout is set to be a ConsoleAppender.

log4j.appender.stdout=org.apache.log4j.ConsoleAppender

# * stdout uses PatternLayout.

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=org.apache.log4j.ConsoleAppender

log4j.appender.stdout.layout=org.apache.log4j.PatternLayout



# * R is set to be a RollingFileAppender.

log4j.appender.R=org.apache.log4j.RollingFileAppender

log4j.appender.R.File=c:/logs/APPB.log

# * Max file size is set to 1KB

log4j.appender.R.MaxFileSize=1KB

# * Keep one backup file

log4j.appender.R.MaxBackupIndex=1

# * R uses PatternLayout.

log4j.appender.R.layout=org.apache.log4j.PatternLayout

log4j.appender.R.layout.ConversionPattern=[%d{MM-dd- HH:mm:ss}] %p -
%m%n



# Set Struts/Commons log level

log4j.logger.org.apache.struts=WARN

log4j.logger.org.apache.commons=WARN

Thanks and Regards
Prashant Saraf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]