Auto-generate Android Log TAG in Android Studio/Intellij idea

I find a solution

1) Create a new live template in plain group
2) In template text :

private static final String TAG = $CLASS_NAME$.class.getSimpleName();

3) Define a usage scope :

enter image description here

4) Choose a shortcut :

enter image description here

finally click on Edit variables and change expression value to className()

enter image description here

Click Ok , Apply, Ok and use.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)