Надо было еще либу добавить
<dependency>
<groupId>org.codehaus.janino</groupId>
<artifactId>janino</artifactId>
<version>2.6.1</version>
</dependency>
А так же немного упростил код
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<if condition='property("os.name").toLowerCase().startsWith("windows")'>
<then>
<file>${APPDATA}/MyApp/logs/MyApp.log</file>
</then>
<else>
<if condition='property("os.name").toLowerCase().startsWith("mac")'>
<then>
<file>${user.home}/Library/Application Support/MyApp/logs/MyApp.log</file>
</then>
<else>
<file>${user.home}/.myapp/logs/myapp.log</file>
</else>
</if>
</else>
</if>
<encoder>
<Pattern>[%d{Y-MM-dd HH:mm:ss}] [%level] %msg%n</Pattern>
</encoder>
<prudent>true</prudent>
</appender>
<root level="INFO">
<appender-ref ref="FILE"/>
</root>
</configuration>