-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Simon,

On 12/21/11 2:55 AM, Simon wrote:
> It is not really a hack in log4j configuration to redirect the logs
> in stdout, as it is exactly what does the ConsoleAppender by
> default...

True, log4j supports log-to-console. It's only a hack because of the
other stuff you have to do to get it to work.

> The idea here is that we (the developpers) can focus on *what* get 
> logged by configuring the log categories and the log pattern in
> the log4.properties file using a simple ConsoleAppender.

I understand the use case for a logging framework.

> Our infrastructure team (responsible for the server configuration
> and resources) can focus on *where* the logs go (a file, a rolling
> file, a JMS queue, syslog, or whatever the need) in the Tomcat
> configuration.
> 
> This has the other advantage to have a log4.configuration file and
> a web application that are not too much dependant of the
> environment (Unix file path vs Windows file path for example)...

So, you're saying that you want your intra team to be able to dictate
where the logs go, but you don't want them to be able to configure the
logger properly to do that. I'm not a huge fan of that philosophy.

> I guess this why the <stdout /> feature is available in Resin...
> At least it would help in this use case !

As I said, you can do this in Tomcat. I just think it's a bad idea.
The "swallowOutput" flag IMO is a hack to get around applications that
are still using System.out for logging purposes. What you are trying
to do is take a perfectly reasonably use of a logging system and turn
back the clock to 1997. If that's what works for you, go for it. I
just think there are better solutions.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7x+3wACgkQ9CaO5/Lv0PAY5ACdH9CbpvjSVmWANTNZmYhYNu7n
xQUAoK23Aj5Vd52qL2/Tungyp665SXzc
=+cRq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to