Hi,

Meanwhile I cobbled together a "solution" using log4j filters. This goes in 
your log4j.properties, substituting your actual appender for "testBO":

____________________
log4j.appender.testBO.filter.1=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.1.StringToMatch=Creating proxy for service
log4j.appender.testBO.filter.1.AcceptOnMatch=false

log4j.appender.testBO.filter.2=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.2.StringToMatch=Creating non-proxied instance of 
service
log4j.appender.testBO.filter.2.AcceptOnMatch=false

log4j.appender.testBO.filter.3=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.3.StringToMatch=Constructed configuration:
log4j.appender.testBO.filter.3.AcceptOnMatch=false

log4j.appender.testBO.filter.4=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.4.StringToMatch=Invoking constructor
log4j.appender.testBO.filter.4.AcceptOnMatch=false

log4j.appender.testBO.filter.5=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.5.StringToMatch=Invoking method
log4j.appender.testBO.filter.5.AcceptOnMatch=false

log4j.appender.testBO.filter.6=org.apache.log4j.varia.StringMatchFilter
log4j.appender.testBO.filter.6.StringToMatch=Constructing service 
implementation via
log4j.appender.testBO.filter.6.AcceptOnMatch=false
__________________

Notes:
- It would be easier to blacklist "invoking" but it's just a commonly used word 
that I don't want to take the risk.
- This might or might not work depending on your log4j version. See: 
http://stackoverflow.com/questions/3730343/log4j-stringtomatch-in-property-file

It also helps to set -Dtapestry.service-reloading-enabled=false. This has to be 
a system property so for tests you have to set it as default JVM argument in 
the list of you installed JREs.

Kind Regards,
Wulf

-----Original Message-----
From: Wechsung, Wulf [mailto:wulf.wechs...@sap.com] 
Sent: Freitag, 24. Oktober 2014 13:32
To: Tapestry users (users@tapestry.apache.org)
Subject: Tapestry Classes Logging with Application Loggers

Hi Tapestry-users,

Tapestry's AbstractReloadableObjectCreator, LoggingInvokableWrapper, 
ModuleImpl, RegistryImpl and others log a lot of really boring stuff. For some 
of our tests it's actually the majority of the log output making it difficult 
to visually parse what's going on in the application. Unfortunately they use 
the application loggers ie the category of the log entry is always the class 
they are doing stuff to and not their own class so I can't turn off their 
logger without turning off the application logging.

This happens with Tapestry 5.3.6 and log4j 1.2.

Is there any workaround on the tapestry side because I don't see how I can 
filter these log entries via log4j?

Thanks for your help in advance!

Best Regards,
Wulf






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

Reply via email to