When I m tapping on the log button corresponding to my application of spring boot admin dashboard I m getting Error while reading logfile: -
error. Does somebody faced this already?
I m using log4j with such configuration:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
<errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler"/>
<param name="Target" value="System.out"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE}] [%-5p] [%c{1}] [%t] [%m]%n"/>
</layout>
</appender>
<appender name="file" class="org.apache.log4j.RollingFileAppender">
<param name="append" value="false" />
<param name="maxFileSize" value="10KB" />
<param name="maxBackupIndex" value="5" />
<param name="file" value="service-rest.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%d{ABSOLUTE}] [%-5p] [%c{1}] [%t] [%m]%n"/>
</layout>
</appender>
<root>
<priority value="DEBUG"/>
<appender-ref ref="CONSOLE"/>
<appender-ref ref="file" />
</root>
</log4j:configuration>
我的申请。 垃圾卷宗有这种伐木部分:
logging:
file: "service-rest.log"
level:
org:
springframework:
boot:
autoconfigure:
logging: DEBUG
也可直接从<代码>http://url/actuator/logfile上查阅该日志。