diff options
Diffstat (limited to 'netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java')
-rw-r--r-- | netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java b/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java index 157d91f..2571178 100644 --- a/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java +++ b/netx/net/sourceforge/jnlp/util/logging/UnixSystemLog.java @@ -44,14 +44,23 @@ public class UnixSystemLog implements SingleStreamLogger{ } - + @Override - public void log(String s) { - + public void log(String message) { + final String s = "IcedTea-Web java error - for more info see itweb-settings debug options or console. See http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs for help.\nIcedTea-Web java error manual log: \n" + message; + try { + String[] ss = s.split("\\n"); //exceptions have many lines + for (String m : ss) { + m = m.replaceAll("\t", " "); + ProcessBuilder pb = new ProcessBuilder("logger", "-p","user.err", "--", m); + Process p = pb.start(); + p.waitFor(); + OutputController.getLogger().log("System logger called with result of " + p.exitValue()); + } + } catch (Exception ex) { + OutputController.getLogger().log(ex); + } } - - - } |