tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: "tagging" log messages
Date Thu, 22 Nov 2012 09:50:31 GMT
2012/11/21 Johan Gunnarsson <johan.gunnarsson@init.se>:
> Is there some way to "tag" log messages in log4j.properties depending on
> different criteria?
>
> Today I am splitting up the files like this:
>
> log4j.category.foo.bar=WARN, ALOG, CATCHALL
> log4j.category.foo.bar.mvc.dao.core.EscenicFieldsImpl=ERROR, ALOG, CATCHALL
> log4j.category.foo.bar.mvc.dao.content.TitelSidaDAOImpl=ERROR, ALOG,
> CATCHALL
> log4j.category.foo.bar.mvc.controller.BroadcastBoxController=ERROR, ALOG,
> CATCHALL
> log4j.category.foo.bar.spring.config.LoggingPropertyPlaceholderConfigurer=INFO,
> ALOG, CATCHALL
>
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]=
> WARN, BLOG, CATCHALL
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/foo]=
> WARN, FOOLOG, CATCHALL
> log4j.logger.org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/bar]=
> WARN, BARLOG, CATCHALL
>
> ALOG, BLOG, FOOLOG and BARLOG all goes to different appenders, and CATCHALL
> is exactly what it sounds like.
>
>
> Instead of this i want all entrys to end up in only one file and have some
> kind of tag (like [FOOLOG]) on the entrys that previously ended up in the
> file defined in the FOOLOG appender.
>

This is Tomcat users list.  The Log4J users mailing list is elsewhere
- you should better ask there:

http://logging.apache.org/log4j/1.2/mail-lists.html
http://logging.apache.org/log4j/2.x/mail-lists.html

Best regards,
Konstantin Kolinko

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


Mime
View raw message