Android Question Log window don't clear

Roger C

Active Member
Licensed User
Longtime User
Hi,

I'm confused.
In the log-window there's a butten labled Clear. It's supposed to clear the logs. Or?

It do clear the window but NOT the log.

In the beginning of my program I print current time to the log.
If I run the program. Exit and then clear with the button the window is cleard.
BUT when I then run my program again, I still have the old loggs showing up in the window.

So the button clears the window but not the logs.

After running the program several times the window is totally messed up and I have a hard time to know what are new logs or old...

Is it supposed to work like this?

I want to clear the window AND the logs before I run my program to better see what happens.

Supplied are a pic from the log-window. I run the program at 19:01. THEN cleared the window.
Then I run it again at 19:20 and the old logs comes back.

If it's supposed to work like this, the button is of no use.
 

Attachments

  • Log dont clear.jpg
    Log dont clear.jpg
    72.1 KB · Views: 254

Computersmith64

Well-Known Member
Licensed User
Longtime User
Make sure the "Clear Logs When Deploying" option is checked...

b4amenu.png


- Colin.
 
Upvote 0

Roger C

Active Member
Licensed User
Longtime User
Thanks,
but it is checked. And I'm not deploying, just running test in Debug mode.

The button clears the window but not the logs... They come back next time I run it.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Yeah, when I run an app in debug mode the logs clear automatically. I've rarely (if ever) used the clear button.

- Colin.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
In most cases you will see the old logs when developing with B4A-Bridge. It is related to the way the logs are retrieved from the device logs.

It should be quite simple to see where the new logs start. You can add a line such as this one in Service_Create of the starter service:
B4X:
LogColor("*****************", Colors.Blue)
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Ahhh - I use a USB cable 99% of the time, hence I always see the logs get cleared every build.

- Colin.
 
Upvote 0
Top