So, you want System.out stuff to go to the stdout, is that right?  Just set up a
console appender.  Note that if you want to log to Tomcat's specially named
localhost and context loggers, you'll need to use a log4j.properties file
rather than log4j.xml because the naming pattern violates the XML spec's naming
scheme for attributes of type ID.  This is only true for Log4j-1.2.x.  In Log4j
1.3, we no longer use a DOMConfigurator, but the new JoranConfigurator which
doesn't use a DTD and, therefore, doesn't define <logger> "name" attributes as
of type ID.

You can define loggers and appenders in a way where Tomcat's info can go to a
separate log file than the stdout console or stdout log file.

Jake

Quoting "Dale, Matt" <[EMAIL PROTECTED]>:

> Hi,
>
> We have a 3rd party application which has a nasty habit of chucking out a
> load of messages to stdout and stderr.
>
> Up until tomcat 5 we used a console Logger with swallowOutput turned on to
> catch all that output so it didnt end up in catalina.out.
>
> Obviously in 5.5 this is not possible and Log4J seems to be the way to go.
> I've tried this but not having much luck. I think it's just that I don't
> understand the log4j.properties file.
>
> Could someone perhaps post a sample that would do roughly what I need and I
> can tweak it from there.
>
> Ta
> Matt
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to