Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

Editing Snippet ID: #1006461
Snippet name:
Category, Type:
Content:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
static void logOutput2() {
  File _logFile = null;
  while licensed {
    _logFile = getProgramFile(ymd() + "-" + hms() + ".txt");
    if (_logFile.exists()) sleep(50); else break;
  }
  final File logFile = _logFile;
  
  set(getJavaX(), "customSystemOut", new Appendable() {
    // only using this one
    public Appendable append(CharSequence cs) {
      appendToTextFile(logFile, cs.toString());
      return this;
    }
    public Appendable append(char c) { return this; }
    public Appendable append(CharSequence s, int start, int end) { 
return this; }
  });
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Comment:
Public (visible to everyone):
Created: 2017-01-05 15:18:33

This page without fancy editor.