[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    RE: Tapestry Classes Logging with Application Loggers
From:       "Wechsung, Wulf" <wulf.wechsung () sap ! com>
Date:       2014-10-27 14:44:04
Message-ID: D471E4F91E0F3B4D9D2882C057D049951CA32F96 () DEWDFEMB19A ! global ! corp ! sap
[Download RAW message or body]

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.wechsung@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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic