<div><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px">First, you might want to correct t</span><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px">he </span><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-size:14px;line-height:20px"><font face="courier new, monospace">-keep</font></span><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px"> option for the slf4j classes (there's an extra "public"):</span></div>

<div><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px"><br></span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">

<div><span style="font-family:'courier new',monospace">-keep public <b>public</b> class org.slf4j.**</span></div></blockquote><div><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px"><br>

</span></div><div><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px">Then, try adding "{ *; }" to these </span><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-size:14px;line-height:20px"><font face="courier new, monospace">-keep</font></span><span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px"> options:</span></div>

<div><span style="color:rgb(51,51,51);font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:20px;background-color:rgb(251,251,251)"><br></span></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">

<div><div style="direction:ltr"><font face="courier new, monospace">-keep public class ch.qos.logback.** <span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-size:14px;line-height:20px"><b>{ *; }</b></span></font></div>

</div><div><div style="direction:ltr"><font face="courier new, monospace">-keep public class org.slf4j.** <span style="background-color:rgb(251,251,251);color:rgb(51,51,51);font-size:14px;line-height:20px"><b>{ *; }</b></span></font></div>

</div></blockquote><div><br></div><div>Let me know if that works for you.</div><div><br></div><div>-Tony</div><div><br></div><div>On Tue, Feb 26, 2013 at 5:12 AM, Omer Azriel <span dir="ltr"><<a href="mailto:amramaz@gmail.com" target="_blank">amramaz@gmail.com</a>></span> wrote:</div>

<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<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>
</blockquote></div><br>