To answer the original question:
If the log4j.xml used to configure log4j ONLY has:
<root>
<priority value="fatal"/>
</root>
Your log output will be sent absolutely nowhere, as you are not declaring
anywhere for it to go!
The original question is not clear if this snippet is the ONLY configuration or
just a snippet. Thus, we can't give you a full answer.
The log4j manual should explain enough on how to setup your configuration:
http://logging.apache.org/log4j/1.2/manual.html. It does not explicitly give
examples in the XML configuration format, but translating between the two is
easy enough.
-----Original Message-----
From: Shriver, Daniel [mailto:[email protected]]
Sent: Thursday, April 09, 2009 1:26 PM
To: Log4J Users List
Subject: RE: AW: Newbie questions
If someone tells you:
"I filled the gas tank of my motorcycle but it doesn't run. Oh, by the way, it
has no engine- how do I get it to run?"
What would you think, would you think MAYBE the person should read up on the
basics first? Perhaps he didn't need to say it was a dumb question, but what
would you think?
Your other statements sound like "Well, I got my motorcycle with no engine to
coast down the hill! And you people should really have instructions on running
one without an engine!"
If you want to run without an appender fine. You could even try to run log4j
with no setup, or even no downloaded jars... don't expect it to work well
though.
________________________________________
From: John El [[email protected]]
Sent: Thursday, April 09, 2009 1:02 PM
To: [email protected]
Subject: Re: AW: Newbie questions
Thanks for your no help at all.
There is no appender, and I've found the log by running grep over all the
likely files, and by grepping that file name I've found where the log file is
set. I've searched the documentation for this kind of set up and found nothing.
I've found info on properties files and the most useful thing I've found about
using an xml file for log4j configuration was a blog where the guy says that
there doesn't seem to be a good source of info on this.
My questions may have been dumb, but you weren't smart enough to provide an
answer. I can't imagine why you bothered to reply to my post if you had
nothing of value to add. Lots of spare time? A feeling of superiority when
you call my question dumb? Can't be that because you don't seem superior enough
to have an answer.
One more dumb question for you. If you're so smart, where did I find the set
up for the fatal log? And why?
I know the answers now, but do you?
Bender Heri wrote:
>
> If you do not specify any appender, your log message will go nowhere.
>
> Please read first the basics about log4j, before asking such dumb
> questions. Search the web for "log4j tutorial" and you will find tons
> of instructions and examples.
>
> Heri
>
--
View this message in context:
http://www.nabble.com/Newbie-questions-tp22938434p22975234.html
Sent from the Log4j - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]