Append log msg in existing file

Asked by dongleilin

I have been read https://answers.launchpad.net/sikuli/+question/280290...

Can I append log msg in existing file now?

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

Just an idea, not sure whether it works:

According to
https://stackoverflow.com/questions/8043356/file-write-printstream-append
it is possible to create a printStream in append mode:

PrintStream writetoEngineer = new PrintStream(
     new FileOutputStream("Engineer.txt", true));

instead of the simple
PrintStream writetoEngineer = new PrintStream("Engineer.txt");

Maybe it is possible in Sikuli to add a second parameter to Debug.setLogFile and Debug.setUserLogFile to specify "append" (if the file already exists).

Can you help with this problem?

Provide an answer of your own, or ask dongleilin for more information if necessary.

To post a message you must log in.