<div dir="rtl"><br><br><div class="gmail_quote"><div dir="ltr">2013/2/26 Omer Azriel <span dir="ltr"><<a href="mailto:amramaz@gmail.com" target="_blank">amramaz@gmail.com</a>></span></div><blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">
<div style="direction:ltr">hello,</div><div style="direction:ltr">I use logback in my android application and it works great,</div><div style="direction:ltr">However, when I export the application and obfuscate the code using Proguard, it does not work correctly (I'm using FileAppder, and the file is not created).</div>
<div style="direction:ltr"><br></div><div style="direction:ltr">this is my config file:</div><div style="direction:ltr"><div style="direction:ltr"><configuration></div><div style="direction:ltr"> <appender</div>
<div style="direction:ltr"> name="userClicksAppender"</div><div style="direction:ltr"> class="ch.qos.logback.core.FileAppender" ></div><div style="direction:ltr"> <file></div>
<div style="direction:ltr"><span style="white-space:pre-wrap"> </span>/sdcard/Test/data/log.txt</div><div style="direction:ltr"> </file></div><div style="direction:ltr"> <append></div>
<div style="direction:ltr"><span style="white-space:pre-wrap"> </span>true</div><div style="direction:ltr"> </append></div><div style="direction:ltr"> <encoder class="com.android.gooapplication.model.MyEncoder" ></div>
<div style="direction:ltr"> <pattern></div><div style="direction:ltr"><span style="white-space:pre-wrap"> </span>%-4relative [%thread] %-5level %logger{35} - %msg%n</div><div style="direction:ltr">
</pattern></div><div style="direction:ltr"> </encoder></div><div style="direction:ltr"> </appender></div><div style="direction:ltr"> <logger name="userClicksLogger" ></div>
<div style="direction:ltr"> <appender-ref ref="userClicksAppender" /></div><div style="direction:ltr"> </logger></div><div style="direction:ltr"></configuration></div><div style="direction:ltr">
<br></div><div style="direction:ltr">I tried to skip the class MyEncoder and the whole packages of logback in the proguard config file as follows:</div><div style="direction:ltr">-keep public class com.android.gooapplication.model.MyEncoder</div>
<div style="direction:ltr">-keep public class ch.qos.logback.**</div><div style="direction:ltr">-keep public public class org.slf4j.**</div><div style="direction:ltr"><br></div><div style="direction:ltr">but still with no success.</div>
<div style="direction:ltr"><br></div><div style="direction:ltr">what do you think?</div><div style="direction:ltr">Many thanks,</div><div style="direction:ltr">Omer.</div></div></blockquote></div></div>