Android can easily manage the log logs in Android applications. It is a method to remove all log logs when publishing applications
•
Android
There are generally two methods to manage logs. Bloggers recommend that you use the first method below:
The first method:
Step 1: define a logtools tool class. I believe you can understand whose log and whose name can be used as the method name, such as logli. This is the log printed by engineer Li
Step 2: the application method in the program is:
The second method:
The log is often printed during development, but it cannot be printed when we publish the project. To facilitate the operation of log, we need to define a log class ourselves, and then log the following in the development phase_ Set level to 6 so that all logs can be displayed. We will log when publishing_ Level is set to 0. This makes log management very convenient
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码