Debug Messages in Release?

Vircop

Member
Licensed User
Longtime User
Hello,

i switched to Release (The Dropdown List next to the run button) and Run it.
Then it installs to the device (i'm using my android phone) and it starts. Then i see all Log Messages from Debug. How do i create a "proper" release?
 

thedesolatesoul

Expert
Licensed User
Longtime User
Log messages are not from 'debug'. The debugger is a different thing from Log.
Anyway, to remove the Logs you need to remove all of your Log statements.

Another way to do it is to use a switch for enabling/disabling logging. Ofcourse you have to replace all Log statements with vLog. for e.g.

B4X:
Sub vLog(s as String)
      Dim enable_log as Boolean
      enable_log = True
      If enable_log = True then
         Log(s)
      End If
End Sub
 
Upvote 0

Vircop

Member
Licensed User
Longtime User
Thanks. Somehow i have the feeling it's still installing the Debug Version instead of the Release. It's very slow...
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Log messages are not from 'debug'. The debugger is a different thing from Log.
Anyway, to remove the Logs you need to remove all of your Log statements.

Another way to do it is to use a switch for enabling/disabling logging. Ofcourse you have to replace all Log statements with vLog. for e.g.

B4X:
Sub vLog(s as String)
      Dim enable_log as Boolean
      enable_log = True
      If enable_log = True then
         Log(s)
      End If
End Sub

This code is useless.
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Dimming the flag outside of the sub would have a point. One could choose from a 'settings' panel whether logging is to be performed or not.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Dimming the flag outside of the sub would have a point. One could choose from a 'settings' panel whether logging is to be performed or not.

I can agree with that. Having a global "Release" flag would allow to to disable anything you did not want running in the release from one location.
 
Upvote 0

JohnK

Active Member
Licensed User
Longtime User
i switched to Release (The Dropdown List next to the run button) and Run it.
Then it installs to the device (i'm using my android phone) and it starts. Then i see all Log Messages from Debug. How do i create a "proper" release?
There are also Log calls being made by the generated code from B4A side. You can see it in the Java code generated by B4A. The only way I can think of removing ALL log messages would be to edit them out of the generated java, and compile that code. Please correct me if I am wrong as its been a while since I looked at this specifically.
 
Upvote 0
Top