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 @@ -513,6 +513,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 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'); }