Perhaps having come languages like PHP, Javascript or ActionScript, I just can not get used to tagging log output.
Hence I came up with a class: OneLog – one tag.
I initialise OneLog.TAG in my Application class, but it really can go anywhere appropriate.
public class MyApp extends Application { public static final String PACKAGE; static { PACKAGE = MyApp.class.getPackage().getName(); OneLog.TAG = PACKAGE; } ... }
And then you’re free (from tagging):
Log.i("test log");