Usually a customer is served within one separate thread, isn't it? If yes, you
can use the MDC (mapped diagnostic context). You put a value into it:
MDC.put("CUSTOMER", "SOME NAME") at the begin of the session (probably in a
servlet listener) and reference this value with the layout pattern
%X
I am not sure about properties configuration. But with xml configuration I
would do:
- define one logger (your package name, level debug)
- assign two appenders to this logger:
- appender1: with level range filter error and higher
- appender2: without level range filter
Heri
> -Orig
Depends on the implementation of your renderer.
The renderer is called only after log4j framework has decided that a logoutput
will really occur, means that all checks on log levels of logger and appenders
are already executed.
Heri
> -Original Message-
> From: Mohan.Radhakrishnan [mailt
Write your own Renderer derivation which you can specify in xml configuration
(assign to your specific class, see below).
The Trick is that you pass a custom object to the log calls (the param need not
to be a String, it is formally an object):
MySpecificLogInfoHolder infos = new MySpecific
> I've previously searched the manual and I understand the hierarchy of:
> DEBUG < INFO < WARN < ERROR < FATAL
> However, I'm interested in in learning if there is a way to print ONLY
> one level rather than the target level and all levels above it. Unless
> I've missed it, the manual does not expl
I don't know. You have to try if the log4j.xml can be omitted.
Heri
> -Original Message-
> From: Mohan.Radhakrishnan [mailto:moh...@fss.co.in]
> Sent: Tuesday, November 02, 2010 2:39 PM
> To: log4j-user@logging.apache.org
> Subject: RE: Extending Logger
>
>
> Yes. I am responding to you
I am confused. Do you respond to my suggestion? I suggested to set up
everything Logger and Appender) programmatically, as it is defined in your own
config file.
Which performance do you mean? The setup performance or the runtime, when the
loggers are used? The latter is independantly of how you
If I understand you correctly:
You have many instances of your CustomLogger (as many as you want different log
files), each wrapping a separate instance of Logger. The name of the file is
configured in a file (I assume a pairing of logger names and file names?).
My suggestion: Do not extend Logge
What is the reason you want extend the Logger?
Heri
> -Original Message-
> From: Mohan.Radhakrishnan [mailto:moh...@fss.co.in]
> Sent: Thursday, October 21, 2010 1:22 PM
> To: log4j-user@logging.apache.org
> Subject: Extending Logger
>
>
> The complete Log4J manual discourages us from e
One possibility I see:
Write an own Filter which is attached to the root logger's Apender and filter
out the messages which you do not want.
Heri
> -Original Message-
> From: Adam Creeger [mailto:adamcree...@gmail.com]
> Sent: Wednesday, October 20, 2010 11:23 PM
> To: log4j-user@logging.
> It's all bundled within my war file - the log4j-1.2.16.jar is located
> under WEB-INF/lib, the log4j.properties is under WEB-INF/classes.
>
> What I don't understand is why my application affects the logging of
> some other apps on the application server.
>
> -
What application server?
Where is the properties file and the log4j.jar located?
Heri
> -Original Message-
> From: Huber, Stephan [mailto:stephan.hu...@gigatronik.com]
> Sent: Tuesday, May 04, 2010 2:33 PM
> To: log4j-user@logging.apache.org
> Subject: Log4j - do only log statements for my
The IBM lib is overwriting your own log configuration, probably by a active
configure() call. Either you do this in your code, or the library does it. In
the first case you have search, in the second case you have to ask the IBM
library support how to disable the behaviour, or how to configure t
Below I copied the all XML which I reviewing.
http://jakarta.apache.org/log4j/";>
Saludos
Marco Silva
EAI Consultant
On Wed, Apr 14, 2010 at 11:48 AM, Bender Heri wrote:
> Add the attrib
Add the attribute additivity="false" to your specialized loggers in order to
not have the log output in the root logger:
Heri
-Original Message-
From: Marco Silva [mailto:mlsil...@gmail.com]
Sent: Wednesday, April 14, 2010 11:15 AM
To: log4j-user@logging.apa
If I understand you correctly, you want to have several loggers all using the
same appender?
Use the hierarchical approach of the logger repository by prefixing your logger
names:
rent class(AbstractHttpClient) instantiates the
log like this:
private final Log log = LogFactory.getLog(getClass());
Also turns out that this is a commons.logging logger and not a log4j as i
thought Also it looks like it's private so i can't override it, any ideas?
Bender Heri wrote:
>
>
Probably the parent class does not instantiate his logger statically but like
this:
Logger logger = Logger.getLogger( this.getClass().getName() );
and therefore it retrieves a logger with the name of your descendant (name
starting with your namespace). If it would instantiate it statically:
st
There is one point more: You do not define a root logger in your config which
has some benefits
The root is the parent for all loggers which are not explicitely defined (e.g.
also for third party libraries like org.apache).
Typically you set the root logger level to WARN. And for the package/
I cannot see how you configure the LevelRangeFilter. See my example for
separating console.out and console.err:
/2009 08:11 PM57,250 streambuffer.jar
40 File(s) 16,805,402 bytes
2 Dir(s) 52,573,892,608 bytes free
--John
Bender Heri wrote:
>
> Are you sure that your log configuration file is picked up? Maybe
> there is annother config file on the c
Are you sure that your log configuration file is picked up? Maybe there is
annother config file on the class path which is used before yours is found.
I have no problems on Tomcat with special hibernate loggers.
Heri
-Ursprüngliche Nachricht-
Von: John2000 [mailto:johnk...@gmail.com]
Ges
First what I notice is the same int value of your custom levels (both have
6).
But: Why that complicated? Why not only define two separate loggers by name, a
"SuccessLogger" and a "FailLogger"? The places where one of these loggers are
called know about the success or the failure (your solut
logfiles up to 200 MB didnt throw any problems (on windows XP and winserver2003
with NTFS).
Heri
-Ursprüngliche Nachricht-
Von: shaoxianyang [mailto:ysxsu...@hotmail.com]
Gesendet: Montag, 2. November 2009 21:47
An: log4j-user@logging.apache.org
Betreff: Is DailyRollingFileAppender effic
You cannot cast it. But if you instantiate the commons Logger with the same
name as your log4j logger your log statements will end up in the same logger
instance (log4j Logger). Commons logging is only a wrapper, and instantiates
log4j if it finds a log4j.jar in the classpath (and not configured
My guess: there are two log4j.jar, probably of different versions: one in the
parent classlaoder and one in the child classloader. Therefore java regards
these two as different classes.
Heri
-Ursprüngliche Nachricht-
Von: chrisgage [mailto:chrisg...@bellsouth.net]
Gesendet: Mittwoch, 28
-Ursprüngliche Nachricht-
Von: Ofer Kalisky [mailto:kali...@hotmail.com]
Gesendet: Mittwoch, 21. Oktober 2009 20:15
An: log4j-user@logging.apache.org
Betreff: Logging without logging to the root logger
Hi,
I have the following con
Of course. MDC content is kept on a per thread basis. Since each session is
handled in its own thread, you can put a value into the MDC somewhere at the
entry point of a session (and remove it again when session is finished). The
formatter of log4j (at least the PatternLayout) can retrieve this
First:
For simple configuration needs (in fact for most configuration needs) you do
not need to call a configurator explicitely. Just put your config file in the
classpath, and log4j finds it for you and autoconfigures itself the first time
the LogManager is loaded (e.g. on a static Logger.getL
Hi all
The appender tag of xml configuration allows formally to be like that:
According to DTD:
But: how to use this feature?
I would like to use one ref to this STANDARD_APPENDERS in my logger
definitions, since I have a lot of finetuned logger definit
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
mailto:hben...@ergonomics.ch
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 t
Brown for the reply.
The following was the reply given by Bender Heri Your problem is a classloader
issue. Keep in mind that the Logger-Universe which you initialize within your
static method is globally the same within the same classloader. Annother
classloader would initialize another logge
Maybe the PatternLayout is not threadsafe? Try to instantiate separate
instances of PatternLayout for each Logger, or synchronize on the sole instance
of PatternLayout.
Heri
PS: It is not quite clear who calls your log method the log-Event, and how
looks the other log method which writes to the
> which then causes all the tabs based logging to occur in a separate
file (defined under the T log definition). The log entries from tabs
are repeated > into the root logger, which is not ideal but I can deal
with.
Have a look at the Additive property of logger/category, and set it to
false (BTW
Problems with the rolling over behaviour occur mostly if more than one Appender
write to the same file, e.g. out from different JVM's (since the file system
cannot rename it if the other Appender still holds a handle on the file).
Heri
-Ursprüngliche Nachricht-
Von: Roberto Simoni [mailt
A common reason for not rolling over is that more than one appender instance
write to the same file, i.e. more than one file handle are open on the same
physical file.
Heri
-Ursprüngliche Nachricht-
Von: DOUTCH GARETH-GDO003 [mailto:gareth.dou...@motorola.com]
Gesendet: Montag, 29. Jun
Something like
log4j.logger.PhasesLogger.additivity=false
I am not quite sure about the correct syntax in properties file (I work always
with xml files).
The additivity flag of a logger prevents the loggin event to climb up further
the logger hierarchy.
Heri
-Ursprüngliche Nachricht-
Vo
You cannot do this by configuration.
What is the problem of having empty log files?
Heri
-Ursprüngliche Nachricht-
Von: inosh [mailto:inosh...@gmail.com]
Gesendet: Mittwoch, 24. Juni 2009 10:59
An: log4j-user@logging.apache.org
Betreff: [SPAM (Keyword Checking)] - Log4j File appenders-gen
If "fixed string" means the string stays the same throughout the lifetime of
the running application you can use the MDC. You add your string into the MDC
at startup and reference its key within the layout pattern ("X{}").
Heri
-Ursprüngliche Nachricht-
Von: durbans [mailto:m34890...@yah
Be sure that all your Loggers use the same file appender (only once
configured). The behaviour of several file appender instances writing to the
same file (in different threads) is undefined and should be avoided.
Heri
-Ursprüngliche Nachricht-
Von: Yair Ogen [mailto:yairo...@gmail.com]
You cannot get access to the file object itself for reading purpose because the
FileAppender uses a FileWriter class for writing to the file. But you can learn
the file name where the appender writes to.
Not each logger instance which you get by Logger.getLogger() has appenders
attached. Only th
Log4j distinguishes between Loggers and Appenders for a good reason:
- Loggers define WHAT is logged (level, source)
- Appenders define WHERE the log statement goes (console, file, etc.) and how
it is formatted
You want to have a new file for each new thread, so this is an appender issue
whic
Hi
In one of my projects I have implemented a swing TextPane Appender. See below
the two classes JTextPaneAppender and JLogoutputFrame.
The first one was copied (and enhanced) from a sample I found in the contribs
package (but which did not work properly). The second one is a standalone
window
If you do not specify any appender, your log message will go nowhere.
Please read first the basics about log4j, before asking such dumb questions.
Search the web for "log4j tutorial" and you will find tons of instructions and
examples.
Heri
-Ursprüngliche Nachricht-
Von: John El [mail
Already looked at the LoggerFactory?
Heri
-Ursprüngliche Nachricht-
Von: Yair Ogen [mailto:yairo...@gmail.com]
Gesendet: Donnerstag, 2. April 2009 10:13
An: log4j-user@logging.apache.org
Betreff: Configure custom logger from file
Hi,
I need to configure a custom Legger that extends the
Two JVM logging to the same file is a "MUST NOT".
Heri
-Ursprüngliche Nachricht-
Von: yokese [mailto:fastturtle...@gmail.com]
Gesendet: Montag, 16. März 2009 13:35
An: log4j-user@logging.apache.org
Betreff: [SPAM (Bayesain Analysis)] - 'DailyRollingFileAppender' problem - two
process, o
I assume you mean following (pseudo code)
If SystempropertyCollectStatistics==True
myLog.info( ... )
The correct way would be to use a special named logger and declare it in the
propeties file with the desired log level.
Possible code in class with statstic logging needs:
Logger myNormalD
Either you strongly restrict the level of your root logger (e.g. ERROR) and
declare a logger for your own classes with DEBUG level:
(appender-refs)
(appender-refs)
Or you go the other way round, you restrict the library loggers stro
The config file seems to be OK (BTW: You should use the tag "logger" instead of
"category" which is deprecated).
How do you fetch the logger instance in LoadCommonData? You should use
"Logger.getLogger( LoadCommonData.class )".
For debugging log4j, add the attribute debug to the root tag:
http:/
Additivity in Properties file:
Log4j.additivity.=false
See also page 53 in Manual.
Heri
-Ursprüngliche Nachricht-
Von: Pat Farrell [mailto:pfarr...@pfarrell.com]
Gesendet: Dienstag, 17. Februar 2009 06:32
An: Log4J Users List
Betreff: [SPAM (Bayesain Analysis)] - Re: sending output fr
What is the problem? The below configuration seems OK, if you replace the "..."
by the other needed parameters (file, layout, etc).
You can put debug="true" to see on the console how log4j configures itself.
Heri
-Ursprüngliche Nachricht-
Von: Steve Cohen [mailto:sco...@javactivity.org]
I think it is not necessary to use Filters as Curt suggested since you dont
want to have an upper limit of the levels. Add the threshold property to the
appender declaration.
Your problem is that you have defined two loggers with the same name. I assume
that the second one overwrites the first
XML is the newer technology. Property files are not guaranteed to be supported
for all upcoming features.
E.g. in XML you can use Filter in appender definitions which you can't use in
Property files.
Heri
-Ursprüngliche Nachricht-
Von: Ashish Kulkarni [mailto:ashish.kulkarn...@gmail.com]
Maybe there exists indeed a file "C:\Programme\Mozilla
Firefox\de\xyz\...\log4j.xml" which is found first by the classloader? Then try
getResources() to get an enumeration of all resources found.
Or try getSystemResource() of the classloader.
Heri
-Ursprüngliche Nachricht-
Von: Linnemann
This is the correct list for questions about using log4j.
Heri
-Ursprüngliche Nachricht-
Von: 刘永辉 [mailto:yh...@cn.ufinity.com]
Gesendet: Dienstag, 10. Februar 2009 06:19
An: log4j-user
Betreff: [SPAM (Bayesain Analysis)] - which mail that I can send my questions
to? - Bayesian Filter d
In your log4j Config, define a subordinated Logger with a higher log level,
e.g. INFO:
To have the log statements of this class only logged at level INFO or higher
Or
To have the log statements of the whole package org.apache.commons log
I suggest to implement a specialized OutputStream which writes to the file
appender (or directly to the file appender's file, if no threading issue
arise). Then replace the default System.out and System.err streams by this
specialized stream.
Heri
-Ursprüngliche Nachricht-
Von: thomas.t
I am not quite shure what you want to do. Do you want to leave all
System.out.println calls in your code? If so, you do not need log4j to redirect
them. Just redirect the System.out Outputstream to a stream of your like.
If you want to use log4j, you have to replace all System.out calls with the
to remote host: Connection timed out
But I have a stupid question, using telnet my client is expected to find a
telnet server on the port 25, while there should be an smtp server.
Am I wrong?
/MAx
-Original Message-
From: Bender Heri [mailto:[EMAIL PROTECTED]
Sent: giovedì 4 dicembre
Try a standalone tool in order to open this socket. E.g. castalia socktest
(free download), or even telnet in your command prompt:
Telnet host port
heri
-Ursprüngliche Nachricht-
Von: Massimo Quagliani [mailto:[EMAIL PROTECTED]
Gesendet: Donnerstag, 4. Dezember 2008 18:02
An: Log4J Us
Hallo Ceki
I found log4j's RepositorySelector very useful, I think I would not have been
able to solved my problem without it.
I use it in a System which is designed to maintain different customers. A
single customer should never see any data (or even know about the existence) of
other custome
You should only define the path and not also the file:
CLASSPATH=%CLASSPATH%;C:\eclipse\workspace\monitor\monitorClient\src\config
Instead of
CLASSPATH=%CLASSPATH%;C:\eclipse\workspace\monitor\monitorClient\src\config\log4j.xml
-Ursprüngliche Nachricht-
Von: raybristol [mailto:[EMAI
Just put your property file into the classpath and you do not have to
worry about initialization of log4j framework. It does it automagically
when you fetch the first logger.
Heri
> -Original Message-
> From: Michael Erskine [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, September 10, 2008
name...
> >>
> >> So for each element, I need a brand new logger with
> appenders exactly
> >> the same as the one defined in log4j.xml file, the only
> difference is
> >> the filename for the appender, there is only one.
> >>
> >> Does thi
Loggers do not have file names attached. Probably you mean a
FileAppender.
Each configured Appender is instantiated as singleton, even if it is
attached to more than one Logger.
Loggers are identified by a arbitrary String, commonly the FQCN.
Therefore you cant clone a Logger which has the same n
structor, I have
> Appender serverAppender = log.getAppender(""XXX_LOG_FILE");
> if (serverAppender != null)
> {
> String name = serverAppender.getName();
> }
>
> serverAppender is always null.
>
> Any thoughts on
Logger.getLogger().getAppender( "SERVER_LOG" );
> -Original Message-
> From: Reza Razavipour [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 26, 2008 2:30 AM
> To: Log4J Users List
> Subject: How to get values from log4j.xml file
>
> All,
>
> I have a log4j.xml file for my applicatio
If your calling class which knows about the involved city runs in a
separate thread context (for each city) you can use the MDC construct
which is maintained on a per thread basis. Just put your city into MDC
somewhere at the thread start when the city is known, and then in the
MultifileAppender yo
My only guess is that setting the additivity flag by code does not have
any effect. Or maybe a kind of activateOptions() on the logger must be
performed.
Why dont you fetch the RootLogger for appending your syslog appender, as
you do in your config example? After the log call you clear the
appende
om.create.CR in the log
> file of com.create.CR"?
> Yes. the foo.bar.XY and com.create.CR has some logging
> messages as well that needs to go to the right log file.
>
> Thanks for helping me with it.
> M.
>
>
> Bender Heri wrote:
> >
> > Quest
Questions see inline.
Heri
> -Original Message-
> From: Camer38 [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 07, 2008 3:24 PM
> To: log4j-user@logging.apache.org
> Subject: RE: "additivity" attribute does not work for
> user-defined logger but works for root logger.
>
>
> But in my
Now things getting clearer.
Log4j maintains a logger hierarchy which is determined by the dot withing the
logger names, similar to the package hierarchy in java.Example:
Config: you declare a logger "foo.bar" and a root logger, both have one (the
same) appender attached.
Code: class foo.bar
Please provide your full log4j.xml.
Heri
> -Original Message-
> From: Camer38 [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2008 3:26 PM
> To: log4j-user@logging.apache.org
> Subject: "additivity" attribute does not work for
> user-defined logger but works for root logger.
>
>
The FQCN is used for determinating the class which issued the log call.
The log framework produces a callstack and searches backwards until it
has found the supplied FQCN. The next entry is then taken for expanding
the %C pattern in the layout.
Normally, if you use the myLogger.debug() (et al.) me
I do not agree to yours "Logs are not for debugging". In heavy loaded
multithreaded applications it could be the only way to debug. The DEBUG
level IS definitively for debugging purpose. In production, I agree, the
level should be INFO or higher.
Heri
> -Original Message-
> From: Julius Da
There might be a problem if you use your own RepositorySelector wich
maintains different Repositories depending on some context (MDC etc.).
Utility classes whose methods can run in different contexts should fetch
the logger each time where it is used.
Heri
> -Original Message-
> From: J
Have you attached the appender to any logger?
Heri
> -Original Message-
> From: Simonebernardi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 08, 2008 12:12 PM
> To: log4j-user@logging.apache.org
> Subject: [SPAM (DNS Blacklist)] - JDBCAppender - Sending mail server
> found on list.dsbl.o
If the string which you supply to logger.info() must first be constructed
(normally a expensive operation which you dont want to do if info is not
enabled) you can avoid this by:
if ( logger.isInfoEnabled() )
{
logger.info( prepareString( args ) );
}
Without this surrounding if the string w
First:
It is not recommended to include the log4j.xml into a jar file, especially not
for third party library. Therefore the best way to solve your problem is either
to remove the file from the jar or - even better - ask the vendor of the
library to do that.
If both is not possible, then you c
Hi
The problem of different log files within the same app does not arise on the
"main" classes of each job (this can be configured very easy through different
appenders), but in all underlying framework and helper classes. If the log
outputs of these underlying classes should be separated too,
I dont really understand your thoughts why an error should not be logged along
with stack trace, since it is an exceptional situation which should not occur
often. Errors in logs are never "noise ratio".
But your problem with classname, linenummer etc. can be solved if you use the
overloaded lo
I am not quite shure about property configuration (I work always with xml). But
I suspect that the double configuration of the root logger ("rootLogger" and
"rootCategory") causes your problem.
But the both lines "rootLogger" and "rootCategory" means the same. The use of
the term "Category" is d
I for myself do such things when preparing the log message, i.e.:
if (myLog.isDebugEnabled())
{
myLog.debug( "received binary data:\n" + Conversions.byteArrayToHexDump(
myByteArray ) );
}
Annother apporach is to write your own renderer. In this case you would have
also to define an own clas
Since you do not specify which displaying application shall show colors I can
give you advice how to achieve it within the eclipse console display:
Configure two separate appenders. One for the levels WARN and higher and one
for the levels INFO and lower. Assign them to the std.err and std.out.
Adding the additivity attribute should do the trick:
BTW: the name "category" is deprecated. Use "logger" instead.
Your cited configuration does not declare the referenced appender FILE.
Heri
> -Original Message-
> From: Adrian Mitev [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, Februar
Hi all
In my actual project I work the first time with spring and hibernate.
Configuring only a root logger on debug level overwhelms the log with messages
from these frameworks. Even on INFO level there still are a lot of messages.
I dont want to switch off the loggings from these frameworks
Log4j is not designed for hooking any system event. It's mainly a very flexible
output channel.
Capturing the stdout: Assign your own OutputStream to System.out and you get
all messages to stdout. These you can write then to any logger you wish.
Exceptions are catched in the normal java way thro
I would use wrappers, if at all, only for app or module wide special loggers
(like fatal error alerting etc.), and only
- if there is a special need to do something with the log event which cannot be
done using the log4j framework
- if some special initializing of the involved appenders is need
In eclipse you can set the working dir in the launch configurations second page
"Arguments".
Heri
> -Original Message-
> From: mbraunwart [mailto:[EMAIL PROTECTED]
> Sent: Friday, November 02, 2007 8:07 PM
> To: log4j-user@logging.apache.org
> Subject: [SPAM (Bayesain Analysis)] - Re: Fil
Hi
I also suggest the approach with using MDC and custom filter.
You probably want the outputs from each thread in separate files. If so, you
have two possibilities:
1. Implementing a own RepositorySelector which holds different repositories for
each thread / thread sub group.
2. Creating and c
Hallo Michael
About a year ago it was discussed to have a MultiFileAppender which can cover
exactly this problem. The idea did not get over a sandbox project and is now
sleeping.
Using current version of log4j it is possible if you write your own repository
selector. The default repository
Yes, you can.
But be aware that at runtime it is the same instance of the appender. So you
can't configure it differently.
Heri
> -Original Message-
> From: Preuss, Jacqueline - ENCOWAY [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 11, 2007 3:46 PM
> To: Log4J Users List
> Subject:
Put the hostname somewhere at app start into MDC:
MDC.put( "hostname", myHostname );
The conversionPattern can resolve MDC values by using the switch %X{}. The
ID in my example is "hostname" (without quotes).
Heri
> -Original Message-
> From: Hans Schwaebli [mailto:[EMAIL PROTECTED]
you cannot add loggers or appenders by configuring them through a second
property file. You must create and add them by code.
In your Log4jSetup class: add a new Logger by code called "com.ck" and set its
additivity flag to false.
Then create your mail and R appenders and attach them to your new
Your Implementation of repository selector is quite useless, because your
distinction criteria relies on the current classloader. Log4j's default
repository selector does this already for you. It is a singleton within the
scope of one distinct classloader. If annother classloader comes onto stag
essage-
> From: chuanjiang lo [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 05, 2006 12:30 PM
> To: Log4J Users List
> Subject: Re: Setting up log4j.xml
>
>
> On 12/5/06, Bender Heri <[EMAIL PROTECTED]> wrote:
> >
> > Log events which are sent to a spe
Log events which are sent to a specialized Logger (=not Root Logger) will by
default climb up the logger hierarchy until the root logger and serve every
appender of every logger found on its way. Your example: a log event sent to
logger named "loggingexample.Main" arrieves to this logger, does n
t;
> > Thanks Heri..thanks for ur help!!!
> > I hope log4j.xml will also be read in the same manner as
> > log4j.properties..
> >
> >
> > Bender Heri wrote:
> >>
> >> If you want to work with filters you must use log4j.xml
> configuration
>
If you want to work with filters you must use log4j.xml configuration instead
of log4j.properties. The properties configuration style does not support filter
entries. It's anyway recommended to use xml configuration since:
- the auto configuration mechanisme of log4j looks first for the log4j.xml
1 - 100 of 219 matches
Mail list logo