Hi Ceki,
I have been using log4j for a while now and I have read the documentation on
numerous occasions. I posted my question because the behaviour I experienced
was not consistent with what I had expected based on my intepretation of the
documentation (warrented that my interpretation may
At 01:32 PM 12/10/2003 +, tom ONeill wrote:
Hi Ceki,
I have been using log4j for a while now and I have read the documentation
on numerous occasions. I posted my question because the behaviour I
experienced was not consistent with what I had expected based on my
intepretation of the
Am trying to use log4j in a JSP file.
Have set up a properties file, made an initialisation servlet, added the
servlet to the applications web.xml,
but I can't get my jsp page to log anything. No errors come up, but
nothing is logged into the file.
I have listed all files below.
Suggestions
Is is possible to be able to log messages to multiple log files based upon
the severity of a message? For instance could I log Errors to a Errors.log
and Warnings to a Warnings.log?
Thanks for the help,
Marty
-
To
Something like this should work. Notice the filter elements (copied from
some earlier post on the user list)
appender name=FILE class=org.apache.log4j.FileAppender
param name=File value=debug_and_info.log/
param name=DatePattern value=_MMdd_HHmm/
layout
Jacob,
thanks for the info. It is exactly what I am looking for.
-Original Message-
From: Jacob Kjome [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 8:00 AM
To: Log4J Users List
Subject: Re: Log4J Multiple Log Files
Something like this should work. Notice the filter
Thanks. now using log4j.properties as you suggest and it seems to be working.
-Duncan
Allistair Crossley wrote:
I've done this by adding the following at the top of my JSP
%
org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger(Application);
%
I use a log4j.properties
Is it possible to put envirinment variables into the configuration file?
The reason I ask is that I develop on a windows machine, and deploy onto
a linux, so the paths where I want to store the logs are differant.
If it is not possible, does anyone have a suggestion for how to do this.
Many
I don't know if log4j can do it automatically, but what we did was to extend
the RollingFileAppender, override the public void setFile (String file)
method and parse the string.
If you find a way to do it automatically please share.
Alon,
-Original Message-
From: Duncan Smith
Hi ,
I need help as i am new in using log4j.xml .
My requirement is
1)When application uses INFO level , all the logs of the application should go into
1 log file ( say a.log)
2)when application uses DEBUG, ERROR ,FATAL level all logs of the application should
go into another
Is it possible to put envirinment variables into the configuration file?
Not as far as I know.
The reason I ask is that I develop on a windows machine, and deploy onto
a linux, so the paths where I want to store the logs are differant.
If it is not possible, does anyone have a suggestion
I asked the same type of question some time back and here is the
solution that I got
http://www.mail-archive.com/[EMAIL PROTECTED]/msg10021.html
I didn't try it because the new classes are not yet in the final release
of log4J - they are only on sandbox.
- Praveen
Duncan Smith wrote on
I do this:
appender name=prfLogFile
class=org.apache.log4j.DailyRollingFileAppender
param name=File
value=${acsauth.loghome}${file.separator}prf${file.separator}prf.log/
...
and set the java properties - this config is portable btw windows and
solaris. Is this what you meant?
Alison
Yeah. Thats the type of thing I meant.
Thanks, Ill give it a go
- Duncan
Alison Ortega wrote:
I do this:
appender name=prfLogFile
class=org.apache.log4j.DailyRollingFileAppender
param name=File
value=${acsauth.loghome}${file.separator}prf${file.separator}prf.log/
...
and set
As Alison Ortega mentioned, log4j configurators support the substitution of
system properties, actually properties in general. Quite a handy feature...
At 09:48 AM 12/10/2003 -0500, Alison Ortega wrote:
I do this:
appender name=prfLogFile
class=org.apache.log4j.DailyRollingFileAppender
Since you're using the xml properties, set up 2 different loggers, and
then attach filters to them.
Keep in mind that when attaching multiple filters to the same logger,
that if the statement fails one filter, it will pass down to the next. A
denial by a filter does not necessarily mean that
Since you're using the xml properties, set up 2 different loggers, and
then attach filters to them.
Keep in mind that when attaching multiple filters to the same logger,
that if the statement fails one filter, it will pass down to the next. A
denial by a filter does not necessarily mean that
Just making sure: note that these are system properties, not environment
variables. You need to use -D when starting java to transport individual
environment variables to the system properties.
Quoting Ceki Gülcü [EMAIL PROTECTED]:
As Alison Ortega mentioned, log4j configurators support the
No, absolutely not.
X.Z and Y.Z should bear no relation to each other except their common
ancestor the 'root' logger.
Does that answer your question?
Thanks for your help Ceki
So you are saying that my Y.Z logger should not be created as X.Y.Z just
because I already have a logger X.Z?.
Hi All,
Hope some of you can give me some insight into this problem. Thank you so
much in advance! I am using log4j in Resin 3.0.3. In each application that
runs in Resin, I put a log4j.xml and log4j.jar in its own WEB-INF/classes
and WEB-INF/lib directories respectively. I defined different
I found out what caused the problem. Thanks!
Vince
-Original Message-
From: Vince Law [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 11:41 AM
To: '[EMAIL PROTECTED]'
Subject: logging data in wrong file
Hi All,
Hope some of you can give me some insight into this problem.
Hi all,
We are getting closer and closer to releasing log4j 1.3 (and yes, we
will get there). In the mean time if anyone is slightly curious about
the new Chainsaw v2 that will be a part of this release, I have written
an Ant-based 'installer' that takes a lot of the effort required to get
Paul,
Great work on the ant file, makes life much easier to get chainsaw up and
running.
It was very convinient for me, as I was just about to start exploring it
again..
Thanks..
One initial comment tho, is there a way to list the full ignore list in a
table or something.
I'm playing with our
One initial comment tho, is there a way to list the full ignore list in a
table or something.
I'm playing with our app and ignoring some loggers, now want to see which
ones I'm ignoring.
I know that they are italliced in the tree, but our tree is large, and I've
only ignored a few..
Is
One other options might be to just hide/show items that are ignored in the
tree, then with an expand all option, you don't even need a new ui.
Right now you can ignore a specific logger, but that doesn't imply that
it should ignore all it's children as well, so if we hide a logger node
in the
One other options might be to just hide/show items that are
ignored in the
tree, then with an expand all option, you don't even need a new ui.
Right now you can ignore a specific logger, but that doesn't
imply that
it should ignore all it's children as well, so if we hide a
logger
I noticed that behaviour, is there a reason. It's a bit annoying to have to
turn off each sub-logger. When configuring loggers, if you set a logger to
FATAL, then all sub-loggers are converted to FATAL, right?? Shouldn't
chainsaw replicate this idea.
Most times nodes in a logger tree
I personally would like to see the logger tree stay simple. Focusing on a node
implies you can see everything under it - makes sense to me.
NOTE: the information following applies only to the CVS tip version of Chainsaw v2:
If you want to exclude certain packages, why not build an expression
28 matches
Mail list logo