Hello,
I followed the approach using a SocketAppender now.
I am starting a SocketServer via the following commandline:
java org.apache.log4j.net.SocketServer port configFile configDir
I have incorporated this commandline in the script that also starts my other 3
processes.
1) Do you know if
I want to format and modify my log4j output prior to sending to a
RollingFileAppender.
If there were functionality that would allow me to easily apply a PatternLayout
prior to sending to a RollingFileAppender that would be ideal.
I can insert an AsyncAppender before my RollingFileAppender, but
RollingFileAppender extends FileAppender so it takes a PatternLayout also.
James Stauffer
-Original Message-
From: F Kurzawa [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 10:55 AM
To: Log4J Users List
Subject: Decorating output before RollingFileAppender
I want to format and
Hi James,
Sorry I wasn't clearer.
I need to be able to decorate the output BEFORE RollingFileAppender. This is
because I need to have different lines laid out out differently depending on
which logger that they came from. I don't have enough control with the single
PatternLayout within RFA to
Thanks for a lovely product!
I find a lot of the features announced for 1.3 very interesting. How
mature is log4j 1.3 currently - and do anybody have an opinion of a sane
release-date?
Kind regards,
David Karlsen
--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
Hola,
If I had $1 for every time we saw this question ;)
I think 12 weeks for 1.3alpha0 is sane ;)
Yoav Shapira
Millennium Research Informatics
-Original Message-
From: David J. M. Karlsen [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 27, 2004 1:09 PM
To: Log4J Users List
Subject:
Hi Yoav,
I might be able to do what I want by extending RollingFileAppender, but a
simpler solution for me would probably be to extend AsyncAppender to accept a
PatternLayout parameter and then apply it before outputting to the next
appender.
Regardless, I was really hoping for a solution that
I have written a couple of filters that 'decorate' logging events - that
may be a better route to go. See PropertyFilter and ReflectionFilter
here:
http://cvs.apache.org/viewcvs.cgi/jakarta-log4j/src/java/org/apache/log4
j/varia/
In particular, ReflectionFilter sets the 'renderedMessage' on the
See the filter javadocs.
Here's an example
appender name=console class=org.apache.log4j.ConsoleAppender
layout class=org.apache.log4j.SimpleLayout/
filter class=org.apache.log4j.varia.ExpressionFilter
param name=Expression value=logger == p1 NDC.userid ==
u23 /
Hi,
How can i add new level to log4j?
Thanks
_
Share a single photo or an entire photo slide show right inside MSNĀ®
Messenger.
Thanks, i 've already found this link but i dont know what values to give to
TRACE_INT and SYSLOG_TRACE_INT they used 800 an d7 but in my case, i need
this level, to be able to call logger.levelName(--); and in the log4j
xml file send email to certain group each time levelName is called.
You won't be able to call logger.levelName because unless you come up with
your own LoggerFactory implementation, which is not recommended but
possible.
The usual way of using your custom level is to use the Logger.log(Level
level, Object message) method.
The numbers used are for comparing Levels
Thanks for ur help
To reference your custom level in the configuration file, you use the
syntax
that is at the very bottom of the example I sent:
trace#my.package.TraceLevel
e.g:
log4j.rootLogger=trace#my.package.TraceLevel, MAIN, STDERR
But how to add it to the xml log4j file not properties
If you read the constructor information in the example, the 9 is the Syslog
equivalent level
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 8:48 AM
To: [EMAIL PROTECTED]
Subject: RE: How to add new level
Thanks,
what about
In the XML file, whereever you could use the strings DEBUG/INFO/WARN/ERROR,
just replace it with the string trace#my.package.TraceLevel.
-Original Message-
From: yacout dadoun [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 28, 2004 8:40 AM
To: [EMAIL PROTECTED]
Subject: RE: How to
I'm sure you can do this by either subclassing the Category or Logger class.
My only question is why do you want another level other than DEBUG,
INFO, WARNING, ERROR, or FATAL? What purpose do you have in mind?
On Tue, 27 Jul 2004 22:02:32 +, yacout dadoun
[EMAIL PROTECTED] wrote:
Hi,
Hello,
I hope someone here can give me a hint. I've been banging my head
against a wall trying to get Hibernate tasks to see a log4j.properties
or log4j.xml file for days. I'm using Ant (of course) for the build.
I'm new to Hibernate, but have used Log4j before without difficulty.
Hibernate's
17 matches
Mail list logo