mirror of
https://github.com/plankanban/planka.git
synced 2025-08-02 20:15:27 +02:00
feat: Make logfile location customizable
It may be desirable to log to a more standard location (e.g. in /var/log/), or in some cases to turn logging to file off. To support these, use a custom config property to determine the location of the output log file, and default to the previous location if it is unset.
This commit is contained in:
parent
e410e21363
commit
94a8011bd6
2 changed files with 4 additions and 1 deletions
|
@ -6,6 +6,8 @@ SECRET_KEY=notsecretkey
|
|||
|
||||
## Optional
|
||||
|
||||
# LOG_FILE=
|
||||
|
||||
# TRUST_PROXY=0
|
||||
# TOKEN_EXPIRES_IN=365 # In days
|
||||
|
||||
|
|
|
@ -6,7 +6,8 @@ const winston = require('winston');
|
|||
*/
|
||||
const defaultLogTimestampFormat = 'YYYY-MM-DD HH:mm:ss';
|
||||
|
||||
const logfile = `${process.cwd()}/logs/planka.log`;
|
||||
const logfile =
|
||||
'LOG_FILE' in process.env ? process.env.LOG_FILE : `${process.cwd()}/logs/planka.log`;
|
||||
|
||||
/**
|
||||
* Log level for both console and file log sinks.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue