Parse a log4j log file

后端 未结 5 1118
温柔的废话
温柔的废话 2020-12-03 15:50

We have several applications that use log4j for logging. I need to get a log4j parser working so we can combine multiple log files and run automated analysis on them. I\'m n

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-03 16:39

    I didn't realize that Log4J ships with an XML appender.

    Solution was: specify an XML appender in the logging configuration file, include that output XML file as an entity into a well formed XML file, then parse the XML using your favorite technique.

    The other methods had the following limitations:

    • Apache Chainsaw - not automated enough
    • jdbc - poor performance in a high performance distributed app

提交回复
热议问题