As the title says, I have a Logger object logger, in a class classname the definition of classname contains a vararg String v. If v does exist, logger should be named that, else it should have a default. How should I do this? My code:
final Logger logger=null;
if(globalLogger!=null){
logger.getLogger(globalLogger);
}
else{
logger.getLogger(ImportThread.class.getName());
}
This returns:The static method getLogger(String) should be accessed in a static way. Is this possible? If not, how should I go about this?