How to sanitize log messages in Log4j to save them in database

前端 未结 9 1694
忘了有多久
忘了有多久 2021-01-01 05:03

I\'m trying to save log messages to a central database. In order to do this, I configured the following Appender in log4j\'s xml configuration:



        
9条回答
  •  旧时难觅i
    2021-01-01 05:39

    As per the Javadocs, the offical JDBCAppender is quite limited, and in particular has no good way of dealing with this issue.

    One way around it is to use an alternative appender, such as this one which aims to be functionally compatible with the Log4J one except, you know, work.

提交回复
热议问题