RE: options and different loggers

2002-07-06 Thread Richard Doust

It means that the root logger's level is set to DEBUG (which basically means
that all logging requests will produce output) and the A1 appender is being
placed into its appender set. The A1 appender is defined in the next
statement in the configuration properties file.
Does that help?

-Original Message-
From: Robert Mark Bram [mailto:[EMAIL PROTECTED]]
Sent: Sunday, July 07, 2002 12:51 AM
To: Log4j
Subject: options and different loggers


Howdy all!

Can anyone tell me what this option does please:
log4j.rootLogger=DEBUG, A1

I am constructing a Jini application - I will have a client and service that
will (in the completed application) reside on different machines. For now,
however, they will both run on the same machine, but from within different
JVM's (communicating via RMI).

How can I make them create different log files?

Should I create different log4j.properties files?

These are the primary configurations I have set in my properties file:

# I don't know what this one means
log4j.rootLogger=DEBUG, A1

# Sets the primary handler to be one that writes to a file
log4j.appender.A1=org.apache.log4j.FileAppender

# Sets the primary handler to be one that writes html output
log4j.appender.A1.layout=org.apache.log4j.HTMLLayout

Rob

:)
:-}
;->


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


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




options and different loggers

2002-07-06 Thread Robert Mark Bram

Howdy all!

Can anyone tell me what this option does please:
log4j.rootLogger=DEBUG, A1

I am constructing a Jini application - I will have a client and service that
will (in the completed application) reside on different machines. For now,
however, they will both run on the same machine, but from within different
JVM's (communicating via RMI).

How can I make them create different log files?

Should I create different log4j.properties files?

These are the primary configurations I have set in my properties file:

# I don't know what this one means
log4j.rootLogger=DEBUG, A1

# Sets the primary handler to be one that writes to a file
log4j.appender.A1=org.apache.log4j.FileAppender

# Sets the primary handler to be one that writes html output
log4j.appender.A1.layout=org.apache.log4j.HTMLLayout

Rob

:)
:-}
;->


--
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: to be deprecated or not to be deprecated ?

2002-07-06 Thread Ceki Gülcü



The Category class was not marked with the @deprecated javadoc tag in
order to make the transition from log4j 1.1 to 1.2 as painless as
possible. At some point in time, the Category class will be marked as
@deprecated.

At 22:19 05.07.2002 +0200, you wrote:
>Hello,
>
>I have an application with a lot of "Category" from log4j 1.1.3. I
>read in the doc of the 1.2.4 version that Category is now deprecated,
>I must use Logger, OK, I agree.
>
>I delete all my .class, and I recompile them, I supposed than the
>compiler will say to me where the Category class are in my source
>file, in order to replace them by Logger.
>
>But I obtain 0 deprecated ! I suppose it's because Category is not
>marked as deprecated with the javadoc tag. Is it a feature, a forget,
>or other ?
>
>Thank in advance.
>
>--
>Sur le Web, tout de suite.
>Herve AGNOUX - diaam informatique
>http://www.diaam-informatique.com

--
Ceki


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