You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Is...@ny.frb.org on 2002/07/17 20:16:38 UTC

Need help with configuration

Hi all:

I'm new to log4j so I wonder if anyone can help me with this.  I set up
logging using a property file and I seem to get an error each time I try to
log.

Here is the property file:

log4j.rootLogger=DEBUG, A1

log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

log4j.logger.org.frb.ny=INFO

The path org.frb.ny is the base path to all the classes that would need to
log.  The class that issues the following statements is called
org.frb.ny.servlet.DispatcherServlet:

Logger logger = Logger.getLogger(this.getClass().getName());

PropertyConfigurator.configure(myProperties);

logger.warn("This is a warning!");

When I run it, I get the following messages on the console:

log4j:ERROR Attempted to append to closed appender named [stdout].
WARN [main] (DispatcherServlet.java:137) - This is a warning!

Does anyone know why the log4j:error is being thrown?

Thanks

Isaac


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Log4j configuration

Posted by bryan hansen <bh...@yahoo.com>.
I don't think it is a loop in the fact that the
machine is froze, it is a loop where the log is I am
not sure, but trying to log to itself. 

The log sends a message to the log???

Somebody obviously knows about it because they print
out a message saying that the server is looping.

--- Ceki G�lc� <ce...@qos.ch> wrote:
> 
> 
> Why on earth is the server entering a loop? On
> windows machine type 
> ctrl-Pause to see a thread dump.
> 
> At 12:01 17.07.2002 -0700, bryan hansen wrote:
> >I think this question was better directed at Log4j
> >than JBoss. We are using JBoss for our development
> >environment and with the latest release if I don't
> use
> >something like the init servlet it will just use
> the
> >jboss instance of the logger to dump out our
> >debug/error messages. If I call the configure
> method
> >though in the init servlet it will put the output
> into
> >a loop for the entire server. I need to do one of
> two
> >things the way I see it to fix the problem.
> >
> >1. Figure out a different way to make it so that
> our
> >application doesn't use the JBoss log4j instance,
> or
> >
> >2. Edit their(Jboss) configuration file so that my
> >output is directed elsewhere so that I can have
> some
> >control over the level of debugging without turning
> >the whole server to debug mode instead of info.
> >
> >TIA,
> >
> >Bryan
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Log4j configuration

Posted by bryan hansen <bh...@yahoo.com>.
It was on JBoss 3.0.0 log4j 1.2.4 using the init
servlet copied out of the short manual. if it makes
any difference I also have struts in the same lib
directory.

Bryan


--- Ceki G�lc� <ce...@qos.ch> wrote:
> 
> 
> Why on earth is the server entering a loop? On
> windows machine type 
> ctrl-Pause to see a thread dump.
> 
> At 12:01 17.07.2002 -0700, bryan hansen wrote:
> >I think this question was better directed at Log4j
> >than JBoss. We are using JBoss for our development
> >environment and with the latest release if I don't
> use
> >something like the init servlet it will just use
> the
> >jboss instance of the logger to dump out our
> >debug/error messages. If I call the configure
> method
> >though in the init servlet it will put the output
> into
> >a loop for the entire server. I need to do one of
> two
> >things the way I see it to fix the problem.
> >
> >1. Figure out a different way to make it so that
> our
> >application doesn't use the JBoss log4j instance,
> or
> >
> >2. Edit their(Jboss) configuration file so that my
> >output is directed elsewhere so that I can have
> some
> >control over the level of debugging without turning
> >the whole server to debug mode instead of info.
> >
> >TIA,
> >
> >Bryan
> 
> --
> Ceki
> 
> 
> --
> To unsubscribe, e-mail:  
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Log4j configuration

Posted by Ceki Gülcü <ce...@qos.ch>.

Why on earth is the server entering a loop? On windows machine type 
ctrl-Pause to see a thread dump.

At 12:01 17.07.2002 -0700, bryan hansen wrote:
>I think this question was better directed at Log4j
>than JBoss. We are using JBoss for our development
>environment and with the latest release if I don't use
>something like the init servlet it will just use the
>jboss instance of the logger to dump out our
>debug/error messages. If I call the configure method
>though in the init servlet it will put the output into
>a loop for the entire server. I need to do one of two
>things the way I see it to fix the problem.
>
>1. Figure out a different way to make it so that our
>application doesn't use the JBoss log4j instance, or
>
>2. Edit their(Jboss) configuration file so that my
>output is directed elsewhere so that I can have some
>control over the level of debugging without turning
>the whole server to debug mode instead of info.
>
>TIA,
>
>Bryan

--
Ceki


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Log4j configuration

Posted by bryan hansen <bh...@yahoo.com>.
I think this question was better directed at Log4j
than JBoss. We are using JBoss for our development
environment and with the latest release if I don't use
something like the init servlet it will just use the
jboss instance of the logger to dump out our
debug/error messages. If I call the configure method
though in the init servlet it will put the output into
a loop for the entire server. I need to do one of two
things the way I see it to fix the problem.

1. Figure out a different way to make it so that our
application doesn't use the JBoss log4j instance, or

2. Edit their(Jboss) configuration file so that my
output is directed elsewhere so that I can have some
control over the level of debugging without turning
the whole server to debug mode instead of info.

TIA,

Bryan

__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>