java程序里面有写日志的地方try{ boolean append = true;
FileHandler fh = new FileHandler(System.getProperty(“user.dir”)+“LogName%g.log",append);
fh.setformatter(new SimpleFormatter);
Logger.getLogger(LogName.log).addHandler(fh);
}
catch(IOException e){
Logger.getLogger(LogName.log).log(Level.SERVER,null,e);
}在windows下运行没问题可以正常的将日志写入文件,但在linux下就有问题了,有时能写到,有时写不到文件中,这是怎么回事
FileHandler fh = new FileHandler(System.getProperty(“user.dir”)+“LogName%g.log",append);
fh.setformatter(new SimpleFormatter);
Logger.getLogger(LogName.log).addHandler(fh);
}
catch(IOException e){
Logger.getLogger(LogName.log).log(Level.SERVER,null,e);
}在windows下运行没问题可以正常的将日志写入文件,但在linux下就有问题了,有时能写到,有时写不到文件中,这是怎么回事
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货