fileappender « API « Java I/O Q&A





1. Java logback FileAppender file pattern    stackoverflow.com

I have appender like this.

<appender name="Action.FileAppender" class="ch.qos.logback.core.FileAppender">
<file>logs\\${date}\\${thread}.log</file>
<encoder>
<pattern>%level - %msg%n</pattern>
</encoder>
</appender>
And i want to ${date} and ${thread} be current date and current thread name. How i can do it?