Re: Help required on log4j implementation using WebSphere 4.0

2002-12-10 Thread Tom Marsh
John:

I'm sure there are a number of ways to do it, but we've been putting 
the .properties file in the same directory as the java class file 
(com.xxx.xxx.class) and using

InputStream is = getClass().getResourceAsStream("mylog.properties");

We're using this for servlets and EJBs.

Tom

> 
> Hi All,
>   I getting following error when i try to implement log4j on 
WebSphere 4.0. I put the log4j jar in the web-inf/lib directory.
> and the log4j.properties file i tried to put it under web-inf/classes 
directory, when the Test Environment starts it automatically deletes 
the properties file. and gives the error.
> Can someone give some help on this. 
> 
> log4j:WARN No appenders could be found for logger 
(org.apache.commons.digester.Digester).
> log4j:WARN Please initialize the log4j system properly.
> 
> regards,
> John
> 
> Visit our website at http://www.ubswarburg.com
> 
> This message contains confidential information and is intended only 
> for the individual named.  If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail.  Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system.
> 
> E-mail transmission cannot be guaranteed to be secure or error-free 
> as information could be intercepted, corrupted, lost, destroyed, 
> arrive late or incomplete, or contain viruses.  The sender therefore 
> does not accept liability for any errors or omissions in the contents 
> of this message which arise as a result of e-mail transmission.  If 
> verification is required please request a hard-copy version.  This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities or 
> related financial instruments.
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 
> 
> 

-- 
NeoMail - Webmail that doesn't suck... as much.
http://neomail.sourceforge.net

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Help required Urgently: og4j:WARN No appenders could be found for logger issue

2002-07-09 Thread srividyar

Thanks to the forum,We finally solved the issue. The the logger class had problems in 
the  getLogger method .

Regds
Sri

>  -Original Message-
> From: srividyar  
> Sent: Saturday, July 06, 2002 2:10 AM
> To:   '[EMAIL PROTECTED]'
> Subject:  Help required Urgently: og4j:WARN No appenders could be found for 
>logger issue
> 
> Environment :
> WAS 4.0, Log4j 1.2rc1
> 
> I am repeatedly getting the message "log4j:WARN No appenders could be found for 
>logger", I have double checked my config file, unable to find any issues with it. 
> Here's the snapshot of the console output
> *]
> log4j: Trying to find [log4j.properties] using context classloader 
>sun.misc.Launcher$AppClassLoader@5531ef88.
> log4j: Trying to find [log4j.properties] using 
>sun.misc.Launcher$AppClassLoader@5531ef88 class loader.
> log4j: Trying to find [log4j.properties] using ClassLoader.getSystemResource().
> log4j: Could not find resource: [log4j.properties].
> log4j: System property is :null
> log4j: Standard DocumentBuilderFactory search succeded.
> log4j: DocumentBuilderFactory is: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
> log4j: URL to log4j.dtd is 
>[jar:file:/C:/jars/log4j-1.2rc1.jar!/org/apache/log4j/xml/log4j.dtd].
> log4j: debug attribute= "true".
> log4j: Threshold ="null".
> log4j: Retreiving an instance of org.apache.log4j.Logger.
> log4j: Setting [bpt] additivity to [true].
> log4j: Level value for bpt is  [info].
> log4j: bpt level set to INFO
> log4j: Class name: 
>[com.inf.common.audit.controller.logservices.ABDailyRollingFileAppender]
> log4j: Setting property [file] to [r.log].
> log4j: Setting property [datePattern] to [-MM-dd-HH-mm].
> log4j: Setting property [layoutType] to [xml].
> log4j: Parsing layout of class: 
>"com.inf.common.audit.controller.logservices.ABXMLLayout"
> log4j: setFile called: r.log, true
> log4j: setFile ended
> log4j: Appender [A1] to be rolled every minute.
> log4j: Adding appender named [A1] to category [bpt].
> log4j: Level value for root is  [info].
> log4j: root level set to INFO
> log4j: Adding appender named [A1] to category [root].
> Inside the private constructore of LoggerManager
> Hellow&& bptFactory nameclass 
>com.inf.common.audit.controller.logservices.ABLoggerFactory
> ###Before calling the call appenders HELLO
> log4j:WARN No appenders could be found for logger (bpt).after the call
> 
> log4j:WARN Please initialize the log4j system properly.
> *]
> 
> 
> I am using DomConifgurator to read the xml file. here's the snaphot of the config 
>file 
> *]
> 
> 
> http://jakarta.apache.org/log4j/"; >
> 
> class="com.inf.common.audit.controller.logservices.ABDailyRollingFileAppender">
> 
> 
> 
>   
>  
>  
> 
>   
>
>
> 
> 
>
> 
>   
>
>
> 
> 
> 
>  
> *]
> 
> 
> What i dont understand is that the file seems to be read completely.On the design 
>front this is how are doing it.We have extended the Logger, 
>LoggerManager,XMLlayout,Level,Dailyrollingfileappender,Repositoryselector and the 
>Loggerfactory.> 
> 
> The extension are for the following 
> 1) to provide for a duration based logging 
> 2) to provide for a configurable layout type(XML/txt)
> 3) to have logical hierarchies
> 4) custom level off below info and on above info.
> 5) choice of appender between daily rolling file and JMS appender depending on 
>deployment.
> 
> tks 
> Sri
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help required Urgently: og4j:WARN No appenders could be found for logger issue

2002-07-06 Thread Ceki Gülcü

At 02:10 06.07.2002 +0530, you wrote:

>The extension are for the following
>
>4) custom level off below info and on above info.

This might bite you very hard in the future. It is a bad idea to
extend Logger to support new level types. You should use the
Logger.log method instead as in:

   logger.log(Your.custom.level, "your message");

The problem stems from the fact that the logger repository might be
set by the EJB Container and not your application. In that situation
the logger instances returned by Logger.getLogger might be
incompatible with what your application expects, i.e. you will get a
NoSuchMethodException when your application accesses info+() or
info-() methods.


--
Ceki


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Help required Urgently: og4j:WARN No appenders could be found for logger issue

2002-07-06 Thread Ceki Gülcü


Have you tested your Logger subclass properly?

At 02:10 06.07.2002 +0530, you wrote:
>Environment :
>WAS 4.0, Log4j 1.2rc1
>
>I am repeatedly getting the message "log4j:WARN No appenders could be 
>found for logger", I have double checked my config file, unable to find 
>any issues with it.
>Here's the snapshot of the console output
>*]
>log4j: Trying to find [log4j.properties] using context classloader 
>sun.misc.Launcher$AppClassLoader@5531ef88.
>log4j: Trying to find [log4j.properties] using 
>sun.misc.Launcher$AppClassLoader@5531ef88 class loader.
>log4j: Trying to find [log4j.properties] using 
>ClassLoader.getSystemResource().
>log4j: Could not find resource: [log4j.properties].
>log4j: System property is :null
>log4j: Standard DocumentBuilderFactory search succeded.
>log4j: DocumentBuilderFactory is: 
>org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
>log4j: URL to log4j.dtd is 
>[jar:file:/C:/jars/log4j-1.2rc1.jar!/org/apache/log4j/xml/log4j.dtd].
>log4j: debug attribute= "true".
>log4j: Threshold ="null".
>log4j: Retreiving an instance of org.apache.log4j.Logger.
>log4j: Setting [bpt] additivity to [true].
>log4j: Level value for bpt is  [info].
>log4j: bpt level set to INFO
>log4j: Class name: 
>[com.inf.common.audit.controller.logservices.ABDailyRollingFileAppender]
>log4j: Setting property [file] to [r.log].
>log4j: Setting property [datePattern] to [-MM-dd-HH-mm].
>log4j: Setting property [layoutType] to [xml].
>log4j: Parsing layout of class: 
>"com.inf.common.audit.controller.logservices.ABXMLLayout"
>log4j: setFile called: r.log, true
>log4j: setFile ended
>log4j: Appender [A1] to be rolled every minute.
>log4j: Adding appender named [A1] to category [bpt].
>log4j: Level value for root is  [info].
>log4j: root level set to INFO
>log4j: Adding appender named [A1] to category [root].
>Inside the private constructore of LoggerManager
>Hellow&& bptFactory nameclass 
>com.inf.common.audit.controller.logservices.ABLoggerFactory
>###Before calling the call appenders HELLO
>log4j:WARN No appenders could be found for logger (bpt).after the call
>
>log4j:WARN Please initialize the log4j system properly.
>*]
>
>
>I am using DomConifgurator to read the xml file. here's the snaphot of the 
>config file
>*]
>
>
>xmlns:log4j="http://jakarta.apache.org/log4j/"; >
>
>class="com.inf.common.audit.controller.logservices.ABDailyRollingFileAppender">
> 
> 
> 
>
>  class="com.inf.common.audit.controller.logservices.ABXMLLayout">
>   
>
>
>
>
>
>
> 
>
>
>
> 
> 
>
>  
>*]
>
>
>What i dont understand is that the file seems to be read completely.On the 
>design front this is how are doing it.We have extended the Logger, 
>LoggerManager,XMLlayout,Level,Dailyrollingfileappender,Repositoryselector 
>and the Loggerfactory.
>
>The extension are for the following
>1) to provide for a duration based logging
>2) to provide for a configurable layout type(XML/txt)
>3) to have logical hierarchies
>4) custom level off below info and on above info.
>5) choice of appender between daily rolling file and JMS appender 
>depending on deployment.
>
>tks
>Sri

--
Ceki


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: help required

2001-03-01 Thread Jim Moore



Yes.  Just have 
seperate FileAppenders with different tolerance levels.  Check the FAQ on 
how to limit was an appender logs.
 
 
-Original Message-From: jayan 
[mailto:[EMAIL PROTECTED]]Sent: Thursday, March 01, 2001 1:39 
AMTo: [EMAIL PROTECTED]Subject: help 
required
hi all
 
 
is it possible to separete  
INFO,WARN,ERROR,FATAL messages to different files 
like INFO message to INFO.txt ,WARN to WARN.txt 
rather than putting it in a single file.
 
thanks in advance
jayakrishnan