简体   繁体   中英

Why are there so many log messages in an Android phone?

When I try to debug my own app with adb logcat , I could always see log messages full of my computer screen.

Comparing to Windows's debugview(OutputDebugMessage), which is alway empty, production software would remove all the debug message.

Is this a tradition to output debug message to logcat/or send meessage to syslog in *nix, or just because programmer does not care about removing the Log statement before deploying their apps in *nix/Android?

You're correct, its not wise to log sensitive information in my opinion. But one can log 'controlled' information, in order to give the debugger guy the opportunity to connect the phone to the debugger and filter out the exceptions before the logs are rotated. Sometimes the app is dependent on external data, which is not predictable sometimes, like a newsfeed or another kind of structured data-feed. When you are not responsible for this feed, you can spit out a line in the log which says eg: 'the import of the feed failed', and you as a develop know exactly where to find this, maybe even directly call the guy responsible for the >£¥¥^%# feed... Just thinking..

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM