Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logging strategy

I'm about to finish my Android application. In the end I have found that I've been using bunch of logging statements, like:

Log.d(TAG, "Blah-blah");

The question is: for production release what should I do with them?

  1. Just comment/stripe log statements
  2. Do something else more sophisticated? Like as I used to do with Log4J properties or so

Please share your experience.

like image 632
Barmaley Avatar asked Dec 02 '10 08:12

Barmaley


People also ask

What is the purpose of logging?

The purpose of logging is to create an ongoing record of application events. Log files can be used to review any event within a system, including failures and state transformations. Consequently, log messages can provide valuable information to help pinpoint the cause of performance problems.

What is logging in coding?

Logging is a means of tracking events that happen when some software runs. Logging is important for software developing, debugging, and running. If you don't have any logging record and your program crashes, there are very few chances that you detect the cause of the problem.

What is logging in cybersecurity?

A log is a record of the events occurring within an organization's systems and networks. Logs are composed of log entries; each entry contains information related to a specific event that has occurred within a system or network. Many logs within an organization contain records related to computer security.


1 Answers

You can remove the logging statements in build time using an obfuscation tool. See here for details.

like image 76
kgiannakakis Avatar answered Nov 10 '22 07:11

kgiannakakis