You could try setting up a separate logger for the exceptions that
shouldn't go to the event log. Then disable additivity in that logger,
and attach only the file appender to it. That way, exceptions logged
through that logger will only go to the file and not the event log.
On 9/21/06, Amit Patha
On 9/13/06, David <[EMAIL PROTECTED]> wrote:
I am using categories, but I can't find the appropiate combination for that.
I expect the following configuration should work:
log4j.rootCategory=DEBUG, logFile, htmlLogFile, console
# com.schinvest is my application
log4j.additivity.com.schi
On 8/29/06, Peter Neu <[EMAIL PROTECTED]> wrote:
But still I get the INFO messages in the server log. What do I have to do?
Are you 100% sure that ALL the quartz loggers are named org.quartz.* ?
--
Javier González Nicolini
-
On 8/22/06, DeMZed <[EMAIL PROTECTED]> wrote:
Exactly.
It seems that I must create a new class MySMTPAppender extending
SMTPAppender :(
You could also do some tunneling or port redirection (redir does this
under linux) outside your jvm enviroment.
--
Javier González Nicolini
On 8/16/06, sudhakardvvn <[EMAIL PROTECTED]> wrote:
Hi,
I want to know how can we use different log fiels for one application for
different functionalities. for example I have to funcationalities in the
application like registerUser() and granstAccessToUser()
create a separate logger hierachy
a separate log file. Similarly, I wanted to have CONFIG, SECURITY,
BUSINESSACTIVITY, >PERFORMANCE custom log levels in the same level
below DEBUG.
I think you would be better served, as James points out, by using
different logging hierachies:
Create different loggers for different stuff, for ex
On 8/11/06, Madduri, Murthy <[EMAIL PROTECTED]> wrote:
We have hierarchical logging in our applications.
But, this requirement is to have the logs grouped based on a custom
level.
For a typical configuration transaction, the logger can record messages
from various hierarchies. We are not guarante
On 8/10/06, lvxiaoyi <[EMAIL PROTECTED]> wrote:
Thank you very much. My problem is that I have hundreds types, and the line
of the log file should be populated from the values of the vo fields.
So, I want to implement a custom Appender and a Layout, and the Appender
could dynamically switch to d
On 8/10/06, wolverine my <[EMAIL PROTECTED]> wrote:
Hi!
I'm actually developing a web application using servlet and so I can
use the client's IP address instead of the client.getName()...
Ah, a web application... no way to know beforehand every single client's id.
mmm, I don't think you can h
On 8/9/06, wolverine my <[EMAIL PROTECTED]> wrote:
One or more clients connecting to the server. How can we log the
message into different client's log files?
E.g. when there are client X, Y, Z connecting to the server. The
messages will be logged into X.log, Y.log and Z.log.
This will be easi
On 8/9/06, 吕晓一 <[EMAIL PROTECTED]> wrote:
Hi all,
I encountered a problem in my requirement.
Several threads will write different type Value Object to an Object Queue,
and one Log thread will consume these VO in the Queue, and the Log thread is
extended from log4J, it will write the VO's value
On 8/3/06, ysuneelreddy <[EMAIL PROTECTED]> wrote:
How can I change it.?
Is there any way to showing current time..
It _is_ the current time, expressed as "The number of milliseconds
elapsed from 1/1/1970 until logging event was created.".
Read this link:
http://java.sun.com/j2se/1.3/docs/ap
On 7/29/06, Eshwaramoorthy Babu <[EMAIL PROTECTED]> wrote:
James you are right. I am doing 'new' every time. Can you please tell me why
this is happening. Because I am calling the log method in the current
instance.
Loggers are static objects. Each time you call new on your class, you
are creat
On 7/28/06, Jitendra Kharche <[EMAIL PROTECTED]> wrote:
Thanks James.
Certainly I will not include log4j jar or classes in my jar. Also I will
not include the config file in my jar. But I am worried about the
following two cases which seem to be very common problem (but I have
never came across
And don't include any kind of log4j configuration file inside the jar.
(had some app server logs VERY cluttered because someone from another
area of the company sent me a packaged library with an included
log4j.xml file with the root logger at debug level... :)
On 7/28/06, James Stauffer <[EMAIL
On 7/28/06, ysuneelreddy <[EMAIL PROTECTED]> wrote:
Hi
Now it is working properly
But…
Data not inserting in the logging_event_property table
Plz see this once…
This is my log4j.xml:>……
Sorry, I don't have further experience with the DBAppender.
Please do not write emails to me dire
On 7/28/06, ysuneelreddy <[EMAIL PROTECTED]> wrote:
In database line number, file name, class name. Method fields r not
inserting.
And also in those fields "?" symbol is inserting.
Try compiling your app using debug information - add the option "-g"
to your javac options.
--
Javier González N
On 7/27/06, ysuneelreddy <[EMAIL PROTECTED]> wrote:
For that what can I do...?
What abt that dialect...
Plz help me...
Please go read some documentation, search the mailing list archives,
and stop begging us to do your work. You have bombarded the list with
requests for code and config files, a
use
org.apache.log4j.varia.ExternallyRolledFileAppender and
trigger it with a message sent to a port but I it is a ugly work around.
Thanks in advance,
Johan Boer
From: Javier Gonzalez gmail.com>
Subject: DailyRollingFileAppender, rolling at midnight
Ne
If you use a lot of inheritance, declaring your loggers in the private
static final way will make calls to logging that are in inherited code
to appear as coming from the superclass.
For example:
class ExampleA {
private static final Logger logger_m = Logger.getLogger(ExampleA.class);
void he
On 7/19/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I hope this is clear enough :)
It is, and your problem looks very non-trivial :)
To me, it looks like you need to implement your own filtering before
invoking buildDebugMessage(), since to access the log4j framework you
need to pass an o
Create separate Loggers for the debug requests, and leave only those
loggers at debug level. Then prepend log.debug() calls with
if(log.isDebugEnabled()), so that the debug messages will only be
created if the particular logger is debug enabled.
(I'm not sure I understood your question correctly,
Hi,
I have an app doing traffic records using log4j.
I need daily logs, so I configured a DailyRollingAppender for said records.
However, the log doesn't rotate at midnight, it rotates when it
receives the first message after midnight has passed. Due to some
batch jobs processing the logs run s
On 7/6/06, avilay parekh <[EMAIL PROTECTED]> wrote:
Apart from log4j-1.2.13.jar, are there any other jars that Logger would be
dependent on?
Nopes.
A possiblity is that my desktop tomcat has some pre-installed jars that
might not be present on the hosting service's tomcat installation. I
gues
NoClassDefFoundError comes up when a class that was present at compile
time isn't there at runtime.
Check that you have uploaded every jar you used during the dev process
to the WEB-INF/lib directory at your hosting service.
On 7/6/06, avilay parekh <[EMAIL PROTECTED]> wrote:
Hi,
I am using lo
On 7/4/06, Eugeny N Dzhurinsky <[EMAIL PROTECTED]> wrote:
On Mon, Jul 03, 2006 at 02:18:13PM -0400, Javier Gonzalez wrote:
> You only have an appender attached to the root logger, and the root
> logger is configured to show only messages of ERROR level and higher.
Ri
You only have an appender attached to the root logger, and the root
logger is configured to show only messages of ERROR level and higher.
A possible fix is configuring the root Logger for DEBUG priority -
however, this will leave all loggers logging at DEBUG level.
Another fix could be configuri
Yes, you can. Be careful, though, that reloading, AFAIK, doesn't drop
the old configuration and load the new one, it loads the new config on
top of the old one. Which means that, if you configured an appender,
and then reload the file without that appender, said appender still
"exists" and is conf
On 6/28/06, Pavan Sara (CONS), IT <[EMAIL PROTECTED]> wrote:
Thank you very much!
I'll try.
What about the second situation I described?
1) A single application
2) Two appenders writing on the same file (but
with different layout and level).
Is it not an acceptable configuration?
According to
On 6/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
This didn't seem to work... It generates a warning
WARN - No such property [threshold] in org.apache.log4j.RollingFileAppender.
Dumb question, but has to be asked: did you use a capital T?
("Threshold", not "threshold").
--
Javier Gonzá
On 6/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I'm new to JAVA and log4j, but I created a singleton object to be my logger
that is used by all the classes in a single threaded project I'm working on..
Is this bad? I suppose I didn't know how to use the log4j api correctly, but I
was
I usually like to declare them private static final. Private because I
don't want any other class accessing the logger, and static final to
keep it "separate" from the class instances.
The exception being when you are subclassing, then it is useful to
declare the logger on the superclass like thi
On 6/9/06, Robert Bowen <[EMAIL PROTECTED]> wrote:
Many thanks for the tip. I still haven't gotten around to implementing it because there
are so few examples of xml files out there (there are many more .properties examples) so
I am not sure exactly how to "attach the app appender to the highes
First off, "Category" is from older releases. It has been deprecated
and replaced with Logger.
The easiest way to achieve what you want (different log levels and
files for different loggers) is to define different appenders and
attach them to the loggers you want, and disabling additivity to said
Follow these steps:
1.- define one file appender for app messages and one appender for
non-app messages.
2.- attach non-app appender to the root logger
3.- attach the app appender to the highest point of your app hierachy.
Here I'm assuming you app is organized with a package hierachy that
can
Hi,
is there a way to configure an appender so that it only logs a certain error
message only once?
(for instance, not have a mailbox overrun with the same error message over
and over, in the case of a SMTPAppender).
TIA,
--
Javier González Nicolini
Hi,
I've got a big app running with log4j. There is, among a bunch of others, a
SMTPAppender for emailing support when something goes wrong. The problem is
that some errors repeat a lot of times in some situations (i.e. a connection
to another server dropping makes a bunch of actions directed to t
root logger at WARN level, and for the loggers that like
to spit a lot of info I disable additivity.
On 3/30/06, Tim Watts <[EMAIL PROTECTED]> wrote:
>
> On Thursday 30 March 2006 15:44, Javier Gonzalez wrote:
> > A way to fix this is to
> > set additivity in your
Does the directory "test" exist?
try putting the absolute path to the log file, i.e.
"/home/silvana/test/output1.txt"
On 3/30/06, Silvana Lima <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Sorry to border you.
> I found your tutorial about Log4J very useful to me, but I am having
> troubles to implement
On 3/30/06, Tim Watts <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Does anyone have an idea why all my log entries are posted twice in the
> log?
It looks like you attached your appenders twice - once for the root logger
and once for a specific logger. Since you haven't turned off additivity in
any lo
You are not using Log4j. You are using the built in logging implemented by
sun (java.util.logging.*).
Check your imports - you should find something like "import
org.apache.log4j.Logger", and not "import java.util.logging.Logger".
On 3/30/06, Max Stolyarov <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
Try not creating any files (but the directory must be writable by tomcat)
On 3/23/06, Glenn Holmer <[EMAIL PROTECTED]> wrote:
>
> I've got several apps using a RollingFileAppender, but one keeps
> overwriting the first file instead of rolling over to .1, .2, .3, etc.
> He is a web app running unde
I think you are using the old terminology. Try replacing "priority" with
"level" and "category" with "logger" and see what happens.
On 3/15/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> I use the sample files in the 1.3 zip to output to a file & the console
> (see below).
> But I get thte
and that would serve to decide
> whether to actually audit the messages using the appenders or not.
>
> Asaf Lahav
>
> VP R&D, Prima Grid LTD.
>
> Cellular: 972-54-4717955
>
> Phone: 972-3-6540255
>
> Fax: 972-3-6540254
>
>
>
> -Original Messag
If I understand correctly... you want to reimplement logging levels? Or do
you want to implement a new Level?
On 3/15/06, Asaf Lahav <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have been going through the log4j documentation and couldn't find what
> I'm looking for… so I decided to ask here before I
Have you tried setting the "Append" option to "false"? IIRC, that option
should cause a rollover, irrespective of file size, on application restart.
On 1/31/06, Rakesh Arora <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using RollingFileAppender. Is it possible to rollover to a new file
> at the tim
Are you sure you are hitting the 10MB log file size?
On 3/9/06, Praveen Kumar Hasthalapuram <[EMAIL PROTECTED]> wrote:
>
> Yes, did changes as you said.
> No change :-(
>
> Thanks,
> Praveen
>
>
> On 3/8/06, Philip Denno <[EMAIL PROTECTED]> wrote:
> >
> > Configuration looks OK. You might try remo
Try setting the whole org.apache.axis.* hierachy to debug, so that you can
see which one is the logger that you really want. (In other words: are you
sure the SOAPPart loggers are the ones that provide the information you
want?)
On 3/3/06, San D <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Is there a way
If I understand correctly, if you want to use your extended classes you'll
have to _replace_ the original log4j classes, not extend them. That's the
only way the app code will call your custom code when initializing a logger.
Isn't it possible to achieve your goals with custom Appenders and Layout
would not work since Log4j is global within one JVM.
> Heri
>
> > -Original Message-
> > From: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> > Sent: Monday, February 27, 2006 4:47 PM
> > To: Log4J Users List
> > Subject: Re: Different log fi
d sorry for those (too simple and annoying) questions.
>
> Javier Gonzalez <[EMAIL PROTECTED]> a écrit :
> Easiest way: include a copy of log4j.jar in each of the web apps'
> WEB-INF/lib folder. Include a separate log4j configuration file in each
> WEB-INF/classes (o
Easiest way: include a copy of log4j.jar in each of the web apps'
WEB-INF/lib folder. Include a separate log4j configuration file in each
WEB-INF/classes (or modify each app to configure log4j in each).
On 2/27/06, julie gautier <[EMAIL PROTECTED]> wrote:
>
> Hi all,
> I use Tomcat to deploy two
You could configure separate appenders for your own app and the jboss AS,
logging to separate files. Then configure the respective loggers to use
those appenders and disable additiviy to stop the logging mixup at the root
logger level.
On 2/24/06, Pedro Costa <[EMAIL PROTECTED]> wrote:
>
> I've my
Use a rolling file appender instead of a normal file appender.
On 2/23/06, Abhay <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a requirement, wherein i need to roll over to another file when my
> log
> is full.
>
> Example : sco.log
> If this file is full, i should'nt loose the logs, i want to kee
Check this out (it's a post from this mailing list, I don't feel like typing
it again ;)
http://marc.theaimsgroup.com/?l=log4j-user&m=114069889813205&w=2
Hope that helps,
Javier.
On 2/23/06, Extra Extra <[EMAIL PROTECTED]> wrote:
>
> HI
> My problem is that i want to generate component specif
I think that you need to identify the naming scheme for the loggers of each
3rd party component (by doing a test run at debug level with a layout
configuration that prints the whole logger name), and then configure log4j
to send each of those logger hierachies to distinct files.
For example, suppo
This is how I did it some months ago (don't know if there's a more elegant
solution to this ;)
Basically, extend the PatternLayout (or whatever Layout you want to use
without stack traces) and
override the "ignoresThrowable()" method to make it return false - that
makes log4j think that your Layou
First of all, I think that you should be using thread operations like
wait(), notify(), etc to synchronize, not log messages, but that's not the
point...
You could keep using your INFO level logs for synchornization, and then set
those specific loggers to INFO level, and leave the rest of the logg
You could handle your configuration via a log4j config file (in xml or
properties format)
Much better than defining everything inside your source code, since that way
you can tweak the
logging configuration without recompiling.
On 2/15/06, Kamal Ahmed <[EMAIL PROTECTED]> wrote:
>
> How do we reso
It must be the only log4j.xml file in the web app's classpath - usually that
means in $context/WEB-INF/classes
You could run your container with the option "-Dlog4j.debug" to see what
configuration is being loaded.
On 2/14/06, Praveen Kumar Hasthalapuram <[EMAIL PROTECTED]> wrote:
>
> I have only
On 2/8/06, DeSantis, MJ Mark @ IS (7179) <[EMAIL PROTECTED]> wrote:
>
> is for nice, user-friendly, user-understandable, messages. So in other
> words
> if we, for instance, caught an exception and wanted the stacktrace to go
> to
> the file but we still wanted something for the user to show up in
ring log4j.xml?
> Like windows, solaris and Linux?
>
> Thanks,
> Praveen
>
> On 2/8/06, Praveen Kumar Hasthalapuram <[EMAIL PROTECTED]> wrote:
> >
> > Thanks Javier.
> >
> > -- Praveen
> >
> > On 2/8/06, Javier Gonzalez <[EMAIL PROTECTED]
Exactly.
cheers,
--
Javier González Nicolini
On 2/8/06, Praveen Kumar Hasthalapuram <[EMAIL PROTECTED]> wrote:
>
> Oh it means, I need to transform entire properties to xml file right?
>
> Regards,
> Praveen
>
> On 2/8/06, Javier Gonzalez <[EMAIL PROTECTED]>
,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
> org.xml.sax.SAXParseException: The content of element type "web-app" must
> match
looks like a syntax error in a xml file, perhaps web.xml?
--
Javier Gonzalez Nicolini
ies are honored). I really don't know
> further :-/
>
> Sorry for bothering and thanks in advance, lg Clemens
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hanges to not be child-first
> by default, which would explain the behavior you are seeing. Are you
> double-dog sure that log4j.jar is in *each* webapp's WEB-INF/lib?
>
> Jake
>
> Quoting Javier Gonzalez <[EMAIL PROTECTED]>:
>
> > Hi,
> >
> > I've
Pattern=%d{HH:mm:ss.SSS} %p %t %c -
> %m%n
>
> # log4j.appender.tomcat.layout.ConversionPattern=%5p (%F:%L) - "%m"%n
>
> # log4j.appender.tomcat.layout.ConversionPattern=%d{HH:mm:ss.SSS} %5p [%t]
> (%F:%L) - "%m"%n
>
>
>
> log4j.logger.org.apache.catal
he only verbose log file logged to is the
reloaded context's, while the other log files sit untouched, and every
additivity configuration of the other webapps is lost.
Can anybody shed some light on this?
Thanks in advance,
--
Javi
Ah, I pulled those from an old xml config file that I had lying
around... nowadays I prefer properties files :)
On 8/9/05, Jacob Kjome <[EMAIL PROTECTED]> wrote:
> Quoting Javier Gonzalez <[EMAIL PROTECTED]>:
>
> > First define your appender
g_application.fatal
>
> thanx,
>
> Xavier.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
&
and add/change appenders for it
> programmatically? Some logging from other 3rd party loggers are still
> showing up but I could redirect their output to my appender by adding it to
> the root logger.
>
> TIA
> --ekiM
>
> -----Original Message-
> From: Javier Gonzalez
. Can I set additivity to false for my root logger so
> that it doesn't relay events yet all my child loggers will?
>
> --ekiM
>
> -Original Message-
> From: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> Sent: July 21, 2005 5:01 PM
> To: Log4J Users List
> Subje
}
>
> }
> catch (Exception e)
> {
> System.out.println("Error setting up logger:
> " + e.getMessage());
> }
> }
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------
> To unsub
s.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -----
>
To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Don't know about capturing System.out or System.err, but the
ConsoleAppender can be created with the property Target set to
System.out or System.err for logging to the desired stream
--
Javier Gonzalez Nicolini
---
>
>
> Yes, my OpenHR class is inside a Jar library BUT i have thousand lines of log
> before 11:34:50, as an example:
>
>
>
>
>
> -Original Message-
> From: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 30, 2005 11:14 AM
> To:
----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ng PatternLayout and
returning false in ignoresThrowable(), as pointed out in my previous
post.
It seems most sensible to apply this at Layout level, so that another
appender that does have an interest in the stack traces can be
attached to the same Logger.
cheers and thanks for the link, it wa
the developer does something ;)
>
> -Original Message-
> From: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 29, 2005 10:59 AM
> To: Log4J Users List
> Subject: Re: Logging the exception message but not the stack trace?
>
> Finally, the easiest
false;
}
}
that way the Appender doesn't forcibly append the stack trace to the
logs, thinking that the Layout will take care of it.
It does have the caveat, though, that the developers must use
informative error messages.
--
Javier Gonzale
ent your own logger and override the log(Priority, Object,
> Throwable) method to parse the exception as you want.
>
>
>
> -Mensaje original-
> De: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> Enviado el: Martes, 28 de Junio de 2005 03:31 p.m.
> Para: log4j-us
t;
>
>
>
>
>
>
>value="D:/resource/mss/post_office/j2ee/from_dev/joel.log"/>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
I didn't get it... try copy-pasting it in the message body.
On 6/28/05, Schuweiler, Joel J. <[EMAIL PROTECTED]> wrote:
> It was attached to the email, did it not go through?
>
> -Original Message-
> From: Javier Gonzalez [mailto:[EMAIL PROTECTED]
> Sent: Tues
t type "log4j:configuration" must match
> "
> Joel Schuweiler
> Middleware
> [EMAIL PROTECTED]
> Tel: 8-7900
> -
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional comma
gger.error("My error message: "+e.getMessage());
}
is not an option :)
any insight is welcome.
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
g at your properties file, doesn't putting [Joel's] in the
pattern work? Or you have multiple projects using the same log4j
configuration?
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
oAppender discard any message with level below INFO.
--
Javier Gonzalez Nicolini
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
tions are gone.
If your logs start disappearing or formatting wrong after a context
reload, check your jars for a rogue log4j.properties, or the
log4j.configuration system variable. Might save you the time I lost
finding it out :)
--
Javier Gonzalez Nicolini
-
90 matches
Mail list logo