diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 14:35:28 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-10-23 14:35:28 +0200 |
commit | 3d08964b6491ac5b79fbebe73b04417fa216a425 (patch) | |
tree | 864da3c1ae0c1ce482e63ccbc258ba43a2118949 | |
parent | e8b12a3c2c2538ba7df7b5b21f126cb7cd425050 (diff) | |
parent | 7bbf586b9b026004da9ea8e00ed46efba6ce1bbf (diff) | |
download | nextcloud-server-3d08964b6491ac5b79fbebe73b04417fa216a425.tar.gz nextcloud-server-3d08964b6491ac5b79fbebe73b04417fa216a425.zip |
Merge pull request #19957 from owncloud/volter-master
Expose syslog tag in the configuration
-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'); } |