logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: Hide *.jar
Date Mon, 29 Jun 2015 15:58:00 GMT
Some possible alternatives:

Are you sure you do not want to simply turn off logging from a specific
logger.

You could also not log the source of stack frame at all. This would apply
to all stack traces if you do this in the pattern.

Gary

On Mon, Jun 29, 2015 at 8:45 AM, Emi Lu <emilu@encs.concordia.ca> wrote:

>
>  This is an excerpt from a stack trace.
>>
>> Assuming it is coming from a log message (you don’t actually have enough
>> below to know for sure), then to filter specific packages from the stack
>> trace you would need to use the filters keyword on the rEx or xEx
>> converters in the PatternLayout.  If you simply don’t want to see
>> exceptions from hibernate then you need to look at the class that is
>> logging them and filter that.
>>
> Tried:
> <RegexFilter regex="org.hibernate.*" onMatch="DENY" onMismatch="ACCEPT" />
>
> But did not work. Do you have an example?
>
> Thanks a lot!
>
>> to hide the following *.jar info?
>>
>>     at
>> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:123)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:126)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:112)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:91)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at org.hibernate.loader.Loader.getResultSet(Loader.java:2066)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1863)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1839)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at org.hibernate.loader.Loader.doQuery(Loader.java:910)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at
>> org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:355)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at org.hibernate.loader.Loader.doList(Loader.java:2554)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>     at org.hibernate.loader.Loader.doList(Loader.java:2540)
>> ~[hibernate-core-4.3.8.Final.jar:4.3.8.Final]
>>
>> Tried:
>>    <Logger name="org.hibernate"     level="FATAL" additivity="false">
>>       <AppenderRef ref="sql_log"    />
>>    </Logger>
>>
>> But they are still shown in log file.
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message