You could map the 3 strings onto MDC key-value pairs, e.g. (m1, "string1)
and address them in a PatternLayout by %X{m1}, etc.
Hope this is what you were looking for.
dirk
> Dear All
>
> Is it possible to log for example a object with 3 strings and
> refer it
> later in PatternLayout with e.g
Hi,
I have 5 different java applications(one has main method, others are
threads) which uses log4j for logging purpose. The mechanism which is
used for to run the programs, is
A manager application starts the other applications. Each application
has its own log4j configuration file with different
Hello Dirk
Thank you very much. That is exacly what I need.
Best Regards
Joerg
OOMS DIRK wrote:
You could map the 3 strings onto MDC key-value pairs, e.g. (m1, "string1)
and address them in a PatternLayout by %X{m1}, etc.
Hope this is what you were looking for.
dirk
Dear All
Is it possible to l
I have seen info on how to use log4j for Tomcat and I have seen info
on how to use log4j for a web app, but I haven't seen info on how to
use log4j for Tomcat logging with a separate config for each app. I
am having troubles getting that to work. Does anyone know of a web
page that explains that?
AFAIK there will be only one log4j configuration per Tomcat. If you want to
differentiate logging behavior between your applications you either:
- have a Logger per application
OR
- if you already have a Logger per class, you could make use of the
hierarchy in log4j and change logging behavior on s
> AFAIK there will be only one log4j configuration per Tomcat.
That would definitely explain some of my problems. :-)
I thought I saw somwhere that it was supported and that
org.apache.log4j.spi.LoggerRepository was used to support it.
-
James,
Ignore my previous message. It seems that it is indeed possible to have a
config per application by putting the log4j config in the WEB-INF/classes of
each application. Sorry for creating the confusing.
dirk
> -Original Message-
> From: James Stauffer [mailto:[EMAIL PROTECTED]
>
I am unable to get that to work. If there is no web site that
explains how to do that then I can post what I have tried and what
happened.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
Hi James
Did you try the following:
1. add log4j.jar to your application WEB-INF/lib
2. add log4j.xml to your WEB-INF/classes
3. connect from your application with e.g.
private static Logger logger = null;
logger.getLogger(CategoryName).log(CategoryName, Level.INFO, message,null);
I remeber that l
I have log4j.jar in WEB-INF/lib and common/lib (so Tomcat can use it).
I have log4j.xml in WEB-INF/classes and common/classes.
It appears that once it is configured once for Tomcat it won't do it
for the app.
-
To unsubscribe, e-m
James,
Have a look at this document:
http://www.qos.ch/logging/sc.jsp
Following that, CVS check out log4j 1.3 and consult the examples
located under ./examples/tiny-webapp/
Although the documentation in ./examples/tiny-webapp/ is up to date,
certain important details in log4j 1.3 ContextJNDISelec
At 02:43 PM 1/18/2005, you wrote:
AFAIK there will be only one log4j configuration per Tomcat.
See http://www.qos.ch/logging/sc.jsp
--
Ceki Gülcü
The complete log4j manual: http://www.qos.ch/log4j/
-
To unsubscribe, e-mail: [EMA
On Tue, 18 Jan 2005 19:10:29 +0100, Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> Have a look at this document:
>
>http://www.qos.ch/logging/sc.jsp
>
> Following that, CVS check out log4j 1.3 and consult the examples
> located under ./examples/tiny-webapp/
Does that work with 1.2.9?
At 07:15 PM 1/18/2005, James Stauffer wrote:
On Tue, 18 Jan 2005 19:10:29 +0100, Ceki Gülcü <[EMAIL PROTECTED]> wrote:
> Have a look at this document:
>
>http://www.qos.ch/logging/sc.jsp
>
> Following that, CVS check out log4j 1.3 and consult the examples
> located under ./examples/tiny-webapp/
Do you know if Tomcat 5.0 sets the RepositorySelector? Would I have
to use the code on that page to set the RepositorySelector?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
At 07:54 PM 1/18/2005, you wrote:
Do you know if Tomcat 5.0 sets the RepositorySelector? Would I have
to use the code on that page to set the RepositorySelector?
Tomcat 5.0 does not set the RepositorySelector.
You can set the repository selector by setting the
log4j.repositorySelectorClass system
Quoting Ceki Gülcü <[EMAIL PROTECTED]>:
>
> James,
>
> Have a look at this document:
>
>http://www.qos.ch/logging/sc.jsp
>
>
> Following that, CVS check out log4j 1.3 and consult the examples
> located under ./examples/tiny-webapp/
>
> Although the documentation in ./examples/tiny-webapp/ is u
17 matches
Mail list logo