AW: Newbie questions

2009-04-09 Thread Bender Heri
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 

-Ursprüngliche Nachricht-
Von: John El [mailto:jo...@mailinator.com] 
Gesendet: Dienstag, 7. April 2009 23:15
An: log4j-user@logging.apache.org
Betreff: [SPAM (Bayesain Analysis)] - Newbie questions - Bayesian Filter 
detected spam


can someone tell me where fatal messages go if this is in my config file?

root
   priority value=fatal/
/root

also can someone point me to a resource that describes all the potential 
arguments in this file for category and appender xml elements?

TIA
John


--
View this message in context: 
http://www.nabble.com/Newbie-questions-tp22938434p22938434.html
Sent from the Log4j - Users mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: AW: Newbie questions

2009-04-09 Thread John El

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: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: AW: Newbie questions

2009-04-09 Thread Douglas E Wegscheid
 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 would have had to agree with Bender's statement that logging with no 
appenders makes the logging go nowhere, and I put together a test case to 
make sure: 

the program:

import org.apache.log4j.Logger;


public class TestNoAppenders {
  public static void main (String[] args) {
System.setProperty(log4j.debug, true);
System.setProperty(log4j.configuration, 
file:log4j-noappender.xml);
 
Logger logger = Logger.getLogger(foo);
logger.info(hello);
  }

}

the configuration:

?xml version=1.0 encoding=UTF-8 ?
!DOCTYPE log4j:configuration SYSTEM log4j.dtd
log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=
true
 root
  priority value=INFO /
 /root
/log4j:configuration

The output to stdout/stderr:

log4j: Using URL [file:log4j-noappender.xml] for automatic log4j 
configuration.
log4j: Preferred configurator class: org.apache.log4j.xml.DOMConfigurator
log4j: System property is :null
log4j: Standard DocumentBuilderFactory search succeded.
log4j: DocumentBuilderFactory is: 
org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
log4j: debug attribute= true.
log4j: reset attribute= false.
log4j: Threshold =null.
log4j: Level value for root is  [INFO].
log4j: root level set to INFO
log4j:WARN No appenders could be found for logger (foo).
log4j:WARN Please initialize the log4j system properly.

which is exactly what experience has lead me to expect (I have seen the 
last two lines about a bajillion times in my life...), and Bender's 
statement is quite accurate for the information given...

so now my curiousity is up: where *did* you find your output? if it showed 
up anywhere, I would be inclined to think that a different configuration 
was getting picked up...

Re: AW: Newbie questions

2009-04-09 Thread Edward L. Knoll
Don't get bent out of shape when you decide to post this kind of
question to a public forum and you get the kind of response you did.  A
lot of people monitor these forums to pick up information, to get help
with problems, and/or help people with legitimate.  It's quite
understandable why people get irritated at those that can't be bothered
to do a bit of homework to discover basic information.   Too much of
this kind of noise discourages knowledgeable people from monitoring
these forums. 

RTFM next time and save this forum for non-trivial questions.


On Thu, 2009-04-09 at 10:02 -0700, John El wrote:

 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