logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stadelmann Josef" <josef.stadelm...@axa-winterthur.ch>
Subject AW: Using Log4J with an existing java.util.logging appender
Date Tue, 28 Feb 2012 09:30:18 GMT
Hi Edmondo,

My understanding is that appender is a log4j concept! isn't it?

So your application (maybe an axis2 service or a different web-apps) likes to uses log4j-loggers
and log4j-appenders for logging, 
then your log4j-loggers will send to one or more agreed configured log4j-appender (the destination).

As your AS does not know the appender-concept, how can it log via a log4j-logger to the attached
log4j-appender? It can't!

Otherwise: Your log4j.properties mast have at least one root-logger defined which gets all
what lower level log4j-loggers by use of log4j-additivity=false are not keeping by themselves,
but allow to propagate to the log4j-root-logger, which is often a console. Now if this consol
has the same physical device attached as the jdk-root-logger, what you will see is 1. the
logging events from the AS loggers printed/formatted in a JDK way, and 2. mixed up with log
records from your apps sending to a log4j-logger connected to a log4j-consol-appender.

You can stay with that MIX at the root logger level, or 
you can make your apps using JDK loggers as well, or 
you can configure your AS to make use of the log4j system.

We use the latest for flexibility, 
but even then, the AS will start with its built in logger capability 
unless it reads itself its own log4j configuration properties, when it starts to use log4j

Josef.Stadelmann@
axa-winterthur.ch


-----Urspr√ľngliche Nachricht-----
Von: Edmondo Porcu [mailto:Edmondo.Porcu@gottexbrokers.com] 
Gesendet: Dienstag, 28. Februar 2012 09:08
An: log4j-user@logging.apache.org
Betreff: Using Log4J with an existing java.util.logging appender

Dear all,
Given an application server with his logging (based on jdk logging) I would need my application
which uses log4j to log some information on the application server appender. 

Is that feasible?

Thank you very much
Best Regards


Edmondo PORCU
Associate - Financial software architect
edmondo.porcu@gottexbrokers.com
Avenue de Rhodanie 48
1007 Lausanne
Switzerland
Dir
Fax
+41 (0) 21 560 30 82
+41 (0) 21 617 71 55
The information in this email is confidential and may be legally privileged. If you are not
the intended recipient, you must not read, use or disseminate the information. Although this
email and any attachments are believed to be free of any virus or other defect that might
affect any computer system into which it is received and opened, it is the responsibility
of the recipient to ensure that it is virus free and no responsibility is accepted by the
Gottex Group of Companies for any loss or damage arising in any way from its use.


---------------------------------------------------------------------
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