Programming Tips - How can I avoid hardcoding log tags?

Date: 2013feb28 OS: Android Language: Java Keywords: LOG_TAG, reflection Q. How can I avoid hardcoding log tags? A.
class MyClass { // Make a tag without hardcoding static final String tag = this.getClass().getSimpleName(); MyFunction() { // Use it Log.i(tag, "Stuff"); } }