diff options
-rw-r--r-- | config/config.sample.php | 8 | ||||
-rw-r--r-- | lib/private/log/syslog.php | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/config/config.sample.php b/config/config.sample.php index 743d76aae35..57ab586cb2f 100644 --- a/config/config.sample.php +++ b/config/config.sample.php @@ -514,6 +514,14 @@ $CONFIG = array( 'loglevel' => 2, /** + * If you maintain different instances and aggregate the logs, you may want + * to distinguish between them. ``syslog_tag`` can be set per instance + * with a unique id. Only available if ``log_type`` is set to ``syslog``. + * The default value is ``ownCloud``. + */ +'syslog_tag' => 'ownCloud', + +/** * Log condition for log level increase based on conditions. Once one of these * conditions is met, the required log level is set to debug. This allows to * debug specific requests, users or apps diff --git a/lib/private/log/syslog.php b/lib/private/log/syslog.php index cb42c1dc011..71debaffd33 100644 --- a/lib/private/log/syslog.php +++ b/lib/private/log/syslog.php @@ -34,7 +34,7 @@ class OC_Log_Syslog { * Init class data */ public static function init() { - openlog('ownCloud', LOG_PID | LOG_CONS, LOG_USER); + openlog(OC_Config::getValue("syslog_tag", "ownCloud"), LOG_PID | LOG_CONS, LOG_USER); // Close at shutdown register_shutdown_function('closelog'); } |