Wish Delete in the final APK the Log( ) too.

Daniel-White

Active Member
Licensed User
Longtime User
Howdy everybody.

I would like to hear your thoughts.

I am a little bit paranoiac and lazy with some stuff :eek:.

I noticed the B4A compiler put away the comments as 'This is an example the next Sub do this bla bla in the reverse engineering of my owns APKs , I did not see my owns comments in the code. That is very good. The compiler deleted or not put in the APK file in the compiling process. ;)

I would like the compiler to put away the Log() too, Why the final APK for end user need the debug tool like Log(). I know , I can find and remplace all the Log() with 'Log() from IDE. But I am little bit lazy. :D.

Thanks
 

DonManfred

Expert
Licensed User
Longtime User
Log only in release
B4X:
    #if release
        Log("Bla")
    #end if

Log only in debug
B4X:
    #if debug
        Log("Bla")
    #end if
 

Daniel-White

Active Member
Licensed User
Longtime User
Log only in release
B4X:
    #if release
        Log("Bla")
    #end if

Log only in debug
B4X:
    #if debug
        Log("Bla")
    #end if

Ok DonManfred, if I did not miss understand you, with that sentences, the Log("Bla") will be inside of the APK when I compile with "Release mode".
I am looking to avoid some one use an USB cable and see the Logs outputs in the PC of my released APKs. exist equivalent something like these:

#if debug
Log("Yes I need see the Log to debug")
#End if

So when compile in "Release" that Log will not be in the APK?

Thanks you
 

DonManfred

Expert
Licensed User
Longtime User
Ok DonManfred, if I did not miss understand you, with that sentences, the Log("Bla") will be inside of the APK when I compile with "Release mode".
Correct.
I read your question, have the correct solution in my brain but gave the wrong answer.

i edited my answer and show both...

Here again to clarify.

B4X:
    #if release
        Log("log only in release mode") ' If you compile in DEBUG mode this log will NOT be in the apk...
    #end if
    #if debug
        Log("log only in debug mode") ' If you compile your app in RELEASE mode then this log will NOT be in the apk
    #end if
 
Top