diff options
author | Jiri Vanek <[email protected]> | 2014-01-20 14:59:17 +0100 |
---|---|---|
committer | Jiri Vanek <[email protected]> | 2014-01-20 14:59:17 +0100 |
commit | c6f420acd38b2036d17685efde866debc627c26e (patch) | |
tree | ae292a6d312001a1c212944884d3578de0d6889b /plugin/icedteanp | |
parent | c4bef6cad39892b850022c8f85c1edd97b0c7b40 (diff) |
Added support for system level linux logging
Diffstat (limited to 'plugin/icedteanp')
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginUtils.h | 13 | ||||
-rw-r--r-- | plugin/icedteanp/java/sun/applet/PluginDebug.java | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/plugin/icedteanp/IcedTeaPluginUtils.h b/plugin/icedteanp/IcedTeaPluginUtils.h index d65218a..e28ace3 100644 --- a/plugin/icedteanp/IcedTeaPluginUtils.h +++ b/plugin/icedteanp/IcedTeaPluginUtils.h @@ -47,6 +47,7 @@ exception statement from your version. */ #include <stdio.h> #include <stdlib.h> #include <time.h> +#include <syslog.h> #include <sys/time.h> #include <fcntl.h> @@ -154,6 +155,9 @@ void reset_pre_init_messages(); push_pre_init_messages(ldebug_channel_message); \ } \ } \ + if (plugin_debug_to_system){ \ + /*no debug messages to systemlog*/\ + } \ } \ } while (0) @@ -197,6 +201,15 @@ void reset_pre_init_messages(); push_pre_init_messages(ldebug_channel_message); \ } \ } \ + if (plugin_debug_to_system){ \ + /*java can not have prefix*/ \ + openlog("", LOG_NDELAY, LOG_USER);\ + syslog(LOG_ERR, "%s", "IcedTea-Web c-plugin - for more info see itweb-settings debug options or console. See http://icedtea.classpath.org/wiki/IcedTea-Web#Filing_bugs for help.");\ + syslog(LOG_ERR, "%s", "IcedTea-Web c-plugin error manual log:");\ + /*no headers to syslog*/ \ + syslog(LOG_ERR, "%s", ldebug_body); \ + closelog(); \ + } \ } while (0) diff --git a/plugin/icedteanp/java/sun/applet/PluginDebug.java b/plugin/icedteanp/java/sun/applet/PluginDebug.java index ef34ceb..f0e8370 100644 --- a/plugin/icedteanp/java/sun/applet/PluginDebug.java +++ b/plugin/icedteanp/java/sun/applet/PluginDebug.java @@ -53,7 +53,7 @@ public class PluginDebug { for (Object chunk : messageChunks) { b.append(chunk); } - OutputController.getLogger().log(OutputController.Level.ERROR_ALL, b.toString()); + OutputController.getLogger().log(OutputController.Level.MESSAGE_DEBUG, b.toString()); } } } |