Improve logging

This commit is contained in:
Frederic Guillot
2016-05-07 14:40:49 -04:00
parent 300dabe6b4
commit 6361131d3f
8 changed files with 60 additions and 45 deletions

View File

@@ -8,21 +8,13 @@ Enable/Disable debug mode
-------------------------
```php
define('DEBUG', false);
define('DEBUG', true);
define('LOG_DRIVER', 'file'); // Other drivers are: syslog, stdout, stderr or file
```
The log driver must be defined if you enable the debug mode.
The debug mode logs all SQL queries and the time taken to generate pages.
Debug file path
---------------
```php
define('DEBUG_FILE', __DIR__.'/data/debug.log');
```
All debug information are saved in this file.
If you prefer to send logs to `stdout` or `stderr` replace the value by `php://stdout` or `php://stderr`.
Plugins folder
--------------
@@ -157,6 +149,9 @@ define('LDAP_USER_ATTRIBUTE_EMAIL', 'mail');
// LDAP attribute to find groups in user profile
define('LDAP_USER_ATTRIBUTE_GROUPS', 'memberof');
// LDAP attribute for user avatar image: thumbnailPhoto or jpegPhoto
define('LDAP_USER_ATTRIBUTE_PHOTO', '');
// Allow automatic LDAP user creation
define('LDAP_USER_CREATION', true);
@@ -227,13 +222,18 @@ define('ENABLE_XFRAME', true);
Logging
-------
By default, Kanboard do not log anything.
If you want to enable the logging, you have to set a log driver.
```php
// Enable syslog logging
// Set to false to disable syslog
define('ENABLE_SYSLOG', true);
// Available log drivers: syslog, stderr, stdout or file
define('LOG_DRIVER', '');
// Log filename if the log driver is "file"
define('LOG_FILE', __DIR__.DIRECTORY_SEPARATOR.'data'.DIRECTORY_SEPARATOR.'debug.log');
```
Bruteforce protection
Brute-force protection
---------------------
```php

View File

@@ -6,6 +6,5 @@ Environment variables maybe useful when Kanboard is deployed as container (Docke
| Variable | Description |
|---------------|---------------------------------------------------------------------------------------------------------------------------------|
| DATABASE_URL | `[database type]://[username]:[password]@[host]:[port]/[database name]`, example: `postgres://foo:foo@myserver:5432/kanboard` |
| DEBUG | Enable/Disable debug mode |
| DEBUG_FILE | Debug file location, `DEBUG_FILE=php://stderr` |
| ENABLE_SYSLOG | Enable/Disable logging to Syslog: `ENABLE_SYSLOG=1` |
| DEBUG | Enable/Disable debug mode: "true" or "false" |
| LOG_DRIVER | Logging driver: stdout, stderr, file or syslog |