You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joshua Jackson <jo...@gmail.com> on 2008/03/13 10:39:58 UTC
T5: How to configure T5 not to display unwanted log
Dear all,
Currently I am using T 5.0.11 and it displays a helluva message in the
logs. Is there any way to configure not to display those messages? I
already configured in log4j.properties the log level for
org.apache.tapestry to ERROR, but it is no good. Can anyone give me a
hint on this?
Thanks in advance
--
Let's show the world what we've got.
Blog: http://joshuajava.wordpress.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How to configure T5 not to display unwanted log
Posted by Adam Zimowski <zi...@gmail.com>.
One way to do this is with the log4j filter. You can write your own
filter to do anything you want, but mine simply silently drops
Tapestry logs.
public class Log4jFilter extends Filter {
private String[] _prefix;
private boolean _convertToLowerCase = false;
@Override
public int decide(LoggingEvent aEvent) {
try {
LocationInfo info = aEvent.getLocationInformation();
String className = (_convertToLowerCase ?
info.getClassName().toLowerCase() : info.getClassName());
for(String prefix : _prefix) {
if(className.startsWith(prefix))
return Filter.DENY;
}
}
catch(NullPointerException npe) {
return Filter.NEUTRAL;
}
return Filter.NEUTRAL;
}
public void setPrefix(String aPrefix) {
if(aPrefix != null) {
_prefix = aPrefix.split("\\|");
}
}
public void setConvertToLowerCase(boolean aConvertToLowerCase) {
_convertToLowerCase = aConvertToLowerCase;
}
}
Then, in your log4j configuration do something like:
<appender ....>
<filter class="com.foo.bar.Log4jFilter">
<param name="prefix"
value="org.apache.tapestry|org.anything.you.want|org.and.more"/>
</filter>
</appender>
-adam
On Thu, Mar 13, 2008 at 4:39 AM, Joshua Jackson <jo...@gmail.com> wrote:
> Dear all,
>
> Currently I am using T 5.0.11 and it displays a helluva message in the
> logs. Is there any way to configure not to display those messages? I
> already configured in log4j.properties the log level for
> org.apache.tapestry to ERROR, but it is no good. Can anyone give me a
> hint on this?
>
> Thanks in advance
>
> --
> Let's show the world what we've got.
>
> Blog: http://joshuajava.wordpress.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How to configure T5 not to display unwanted log
Posted by "Filip S. Adamsen" <fs...@fsadev.com>.
I think Conditional was renamed to If at some point.
-Filip
Andy Pahne skrev:
>
> Quite interesting to know how to achieve the same with T4.
>
> My log is full of:
> 2008-03-13 12:23:28,953 WARN [http-8080-Processor24]
> (ComponentSpecificationResolverImpl.java:113) - Component 'Conditional'
> (at classpath:/componentFactory/border/Border.jwc, line 78, column 58)
> is deprecated, and will likely be removed in a later release. Consult
> its documentation to find a replacement component.
>
> Configuring log4j does not help.
>
> Andy
>
>
>
> Joshua Jackson schrieb:
>> Dear all,
>>
>> Currently I am using T 5.0.11 and it displays a helluva message in the
>> logs. Is there any way to configure not to display those messages? I
>> already configured in log4j.properties the log level for
>> org.apache.tapestry to ERROR, but it is no good. Can anyone give me a
>> hint on this?
>>
>> Thanks in advance
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: How to configure T5 not to display unwanted log
Posted by Andy Pahne <ap...@net22.de>.
Quite interesting to know how to achieve the same with T4.
My log is full of:
2008-03-13 12:23:28,953 WARN [http-8080-Processor24]
(ComponentSpecificationResolverImpl.java:113) - Component 'Conditional'
(at classpath:/componentFactory/border/Border.jwc, line 78, column 58)
is deprecated, and will likely be removed in a later release. Consult
its documentation to find a replacement component.
Configuring log4j does not help.
Andy
Joshua Jackson schrieb:
> Dear all,
>
> Currently I am using T 5.0.11 and it displays a helluva message in the
> logs. Is there any way to configure not to display those messages? I
> already configured in log4j.properties the log level for
> org.apache.tapestry to ERROR, but it is no good. Can anyone give me a
> hint on this?
>
> Thanks in advance
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org