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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

python - Error: Unresolved reference 'selenium' What is the reason? -

asp.net ajax - Jquery scroll to element just goes to top of page -