Android.util.Log class, which can be conveniently used to print logs during encoding debugging.
However, in the post-announcement product, it is assumed that there are too many logs to print. can severely affect performance.
make a simple package for the Android.util.Log class. Set debug to False when the product is to be published.
Code such as the following.
public class Logutil {/** is set to False*/private final static Boolean debug = True;private final static String TAG = "Oyp" when officially on-line; public static void V (string tag, string msg) {if (debug) {LOG.V (tag, msg);}} public static void V (String msg) {if (debug) {log.v (TAG, MSG);}} public static void D (string tag, string msg) {if (debug) {LOG.D (tag, msg);}} public static void D (String msg) {if (debug) {log.d (TAG, MSG);}} public static void I (string tag, string msg) {if (debug) {LOG.I (tag, msg);}} public static void I (String msg) {if (debug) {log.i (TAG, MSG);}} public static void W (string tag, string msg) {if (debug) {LOG.W (tag, msg);}} public static void W (String msg) {if (debug) {LOG.W (TAG, MSG);}} public static void E (string tag, string msg) {if (debug) {LOG.E (tag, msg);}} public static void E (String msg) {if (debug) {log.e (TAG, MSG);}}}
====================================================================================
Ouyangpeng welcome reprint, sharing with people is the source of progress!
Reprint please keep the original address : Http://blog.csdn.net/ouyang_peng
====================================================================================
My Android Step-by-step tour------> Android a simple package for log