SimpleDateFormat is not interpreting %g -
final string log_filename = new simpledateformat("'tool_'yyyymmddhhmmss_sss_'%g.log'").format(new date(system.currenttimemillis())); string logfileptrn = new stringbuilder(system.getproperty("user.dir")).append(system.getproperty("file.separator")).append(log_filename).tostring();
when print log file prints log file location:/tool/log/tool_20140625155513_309_%g.log
but actual log file got generated tool_20140625161235_309_0.log
any appreciated.
Comments
Post a Comment