[ 
https://issues.apache.org/jira/browse/LOG4J2-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ralph Goers closed LOG4J2-1875.
-------------------------------

> Filtering Exceptions on Log4J 1.X
> ---------------------------------
>
>                 Key: LOG4J2-1875
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1875
>             Project: Log4j 2
>          Issue Type: Request
>            Reporter: Mert Saygı
>
> Hello there,
> I want to filter some exceptions with Log4J 1.X then i resolved my problem 
> via adding additional library that named log4j-extras-1.2.17.jar in my 
> project. I cannot change log4j.properties to log4j.xml or i cannot upgrade 
> log4j 1.x to log4j 2.x due to my project framework capacities (SmartfoxServer 
> 2X)
> I can filter exceptions that contains FORCE_UPDATE and REGULAR_UPDATE on 
> their message, but i cannot filter exceptions that contains "Room is full" on 
> their message. I tried many combination. I wonder working principle Log4J 
> StringMatchFilter but first, i have to find a solution my problem quickly. Do 
> you know any filter in this library or way to filter exceptions that contains 
> "Room is full" text? Below is my excepiton and filters.
> Best regards.
> My Exception is:
> 07 Apr 2017 | 11:45:26,499 | ERROR | SFSWorker:Ext:1 | Extensions | | 
> EXCEPTION
> com.smartfoxserver.v2.exceptions.SFSJoinRoomException: Join Error - Room is 
> full: 19, Zone: { Zone: Batak } - Can't add User: ( User Name: 
> d354e22339937548abb52ec442eb4eb4, Id: 3, Priv: 0, Sess: 88.253.243.151:33453 )
> at com.smartfoxserver.v2.api.SFSApi.joinRoom(SFSApi.java:990)
> My Property file is:
> log4j.appender.fileAppender.filter.1=org.apache.log4j.varia.StringMatchFilter
> log4j.appender.fileAppender.filter.1.stringToMatch=FORCE_UPDATE
> log4j.appender.fileAppender.filter.1.acceptOnMatch=false
> log4j.appender.fileAppender.filter.2=org.apache.log4j.varia.StringMatchFilter
> log4j.appender.fileAppender.filter.2.stringToMatch=REGULAR_UPDATE
> log4j.appender.fileAppender.filter.2.acceptOnMatch=false
> log4j.appender.fileAppender.filter.3=org.apache.log4j.varia.StringMatchFilter
> log4j.appender.fileAppender.filter.3.stringToMatch=Room%20is%20full
> log4j.appender.fileAppender.filter.3.acceptOnMatch=false



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to