logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject RE: Updating Wrong File
Date Wed, 11 Apr 2007 18:04:10 GMT
Quoting "Eric.Wolf@bcbsks.com" <Eric.Wolf@bcbsks.com>:
>
> 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 <hoju@visi.com> 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 <psaraf@cctc.com>:
> >
> > > I did that still not working...
> > >
> > >
> > > Thanks and Regards
> > > प्रशांत
सराफ
> > > (Prashant Saraf)
> > > SE-I
> > > Cross Country Infotech
> > > Ext : 72543
> > > -----Original Message-----
> > > From: Eric.Wolf@bcbsks.com [mailto:Eric.Wolf@bcbsks.com]
> > > 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"
> > >              <psaraf@cctc.com>
> > >
> To
> > >              04/10/2007 12:53          "Log4J Users List"
> > >              AM                        <log4j-user@logging.apache.org>
> > >
> cc
> > >
> > >              Please respond to
> Topic
> > >                "Log4J Users
> > >                    List"
> Subject
> > >              <log4j-user@loggi         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=10000KB
> > >
> > > 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 10000KB
> > >
> > > log4j.appender.R.MaxFileSize=10000KB
> > >
> > > # ***** 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-yyyy 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: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >




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


Mime
View raw message