Logback: How can i get the log file path?
问题 I'm using Logback in my spring Boot aplication and it's working fine, but i need to get programmatically the absolute path of the file that i'm loggin/writing with the appender's name "FILE-AUDIT". To be more clear, given the xml config file below: <?xml version="1.0" encoding="UTF-8"?> <configuration> <property name="LOG_ROOT" value="/home/sysadmin/logs" /> <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> <encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder