获取错误为
“java.io.IOException: Couldn't get lock for ..\log\abc.log”,不知道为什么会这样。
有人可以帮帮我吗?谢谢
logger = LogManager.getLogManager().getLogger(className);
FileHandler logFile = new FileHandler(file);
// create txt Formatter
SimpleFormatter formatterTxt = new SimpleFormatter();
logFile.setFormatter(formatterTxt);
logger.addHandler(logFile);