Last Updated: February 25, 2016
·
6.503K
· kjellski

IntelliJ Live Template for org.apache.log4j Logger

Go to Preferences -> Live Templates -> Other -> "+" (Add new one)

Enter in "Abbrevation" for example:

logger 

Ente this in the "Template text":

private static Logger logger = Logger.getLogger($CLASS_NAME$.class);$END$ 

Then Click "Edit Variables" and check Skip if defined, enter this into Expression:

className()

Now you can type:

logger + <TAB>

Picture