java - Pmd error regarding logger -


i have line in code:

private transient final logger logger = loggerfactory.getlogger(getclass()); 

i build project , pmd check tells me that:

the logger variable declaration not contain static , final modifiers. 

what can fix this? tried putting static modifier comes error:

cannot make static reference non-static method getclass() type object 

if using in main make static

and use logger this

private static final logger log = logger.getlogger(main.class.getsimplename()); 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -