Android debug tag and Java logger to copy-paste

When using this DEBUG_TAG it's possible to copy-paste it into every new class without changing it. The String will anyway contain the correct simple class name.

private static final String DEBUG_TAG = new Object(){}.getClass().getEnclosingClass().getSimpleName();

If you want to use the entire class name including package use getName() instead if getSimpleName().

You can also use this method for your Java logger.

private static Logger logger = LogManager.getLogger(new Object() {}.getClass().getEnclosingClass().getSimpleName());