1
0
Fork 0
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:
Matthew Stickney 2023-08-04 16:45:34 -04:00
parent e410e21363
commit 94a8011bd6
2 changed files with 4 additions and 1 deletions

View file

@ -6,6 +6,8 @@ SECRET_KEY=notsecretkey
## Optional
# LOG_FILE=
# TRUST_PROXY=0
# TOKEN_EXPIRES_IN=365 # In days

View file

@ -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.