I wrote a logging application and saved the logs in ElasticSearch, then add this appender to the logback.xml file. I applied it in one application and I got the logs from ES.
But when I apply it to another application, the following error appears in the error log:
16:18:26,040 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [com.dcf.iqunxing.fx.dashcam.agent.log.appender.logback.DashcamAppender] 16:18:26,062 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [dashcamAppender] 16:18:26,078 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@110 :12 - no applicable action for [encoder], current ElementPath is [[configuration][appender][encoder]] 16:18:26,080 |-ERROR in ch.qos.logback.core.joran.spi.Interpreter@111 :13 - no applicable action for [Pattern], current ElementPath is [[configuration][appender][encoder][Pattern]]
My logback.xml:
... <appender name="dashcamAppender" class="com.dcf.iqunxing.fx.dashcam.agent.log.appender.logback.DashcamAppender"> <encoder> <Pattern>.%d{HH:mm:ss.SSS} [%thread] %-5level %logger{35} - %msg %n</Pattern> </encoder> <filter class="ch.qos.logback.classic.filter.LevelFilter"> <level>TRACE</level> </filter> </appender> ...
Lost any action (or how to add it) for the log?
java logging logback
auntyellow
source share