summaryrefslogtreecommitdiffstats
path: root/config/config.sample.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-30 12:43:58 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-08 15:58:33 +0200
commite79c255cabecb768061bb58ea508a38011ef6284 (patch)
tree3d91391aac2517acc95ac1ae127dab8b1cb6d42a /config/config.sample.php
parent892b5ceeebae6c2924fdea6d8e066d4df51acba5 (diff)
downloadnextcloud-server-e79c255cabecb768061bb58ea508a38011ef6284.tar.gz
nextcloud-server-e79c255cabecb768061bb58ea508a38011ef6284.zip
Conditional logging
* 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 * Supported conditions (setting `log_condition` in `config.php`): - `shared_secret`: if a request parameter with the name `log_secret` is set to this value the condition is met - `users`: if the current request is done by one of the specified users, this condition is met - `apps`: if the log message is invoked by one of the specified apps, this condition is met * fix unit test and add app log condition test
Diffstat (limited to 'config/config.sample.php')
-rw-r--r--config/config.sample.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/config/config.sample.php b/config/config.sample.php
index 45aaf6a107d..9a40f82252a 100644
--- a/config/config.sample.php
+++ b/config/config.sample.php
@@ -487,6 +487,27 @@ $CONFIG = array(
'loglevel' => 2,
/**
+ * 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
+ *
+ * Supported conditions:
+ * - ``shared_secret``: if a request parameter with the name `log_secret` is set to
+ * this value the condition is met
+ * - ``users``: if the current request is done by one of the specified users,
+ * this condition is met
+ * - ``apps``: if the log message is invoked by one of the specified apps,
+ * this condition is met
+ *
+ * Defaults to an empty array.
+ */
+'log.condition' => [
+ 'shared_secret' => '57b58edb6637fe3059b3595cf9c41b9',
+ 'users' => ['sample-user'],
+ 'apps' => ['files'],
+],
+
+/**
* This uses PHP.date formatting; see http://php.net/manual/en/function.date.php
*/
'logdateformat' => 'F d, Y H:i:s',