logfile - How to mainain log file in java -
i want store(append) output of java code after every execution in same file. including sop statements, execution time , no of files executed etc.
try this:
try(filewriter fw = new filewriter("outfilename", true);     bufferedwriter bw = new bufferedwriter(fw);     printwriter out = new printwriter(bw)) {     out.println("the text"); // appends text     //more code     out.println("more text"); // appends text     //more code, append more text etc.  } catch (ioexception e) {     //exception handling left exercise reader } 
Comments
Post a Comment