Compare commits

..

3 Commits

Author SHA1 Message Date
Maksim Eltyshev
3664bdacc7 chore: Update version 2025-04-22 15:51:47 +02:00
Maksim Eltyshev
728aa901ef chore: Add LOG_LEVEL to environment samples 2025-04-22 15:41:01 +02:00
Maurice Faber
d9393879b5 fix: Allow specifying log level (#1099)
Closes #1098
2025-04-22 15:29:10 +02:00
8 changed files with 15 additions and 11 deletions

View File

@@ -15,13 +15,13 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.23
version: 0.2.24
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.26.0"
appVersion: "1.26.1"
dependencies:
- alias: postgresql

View File

@@ -1 +1 @@
export default '1.26.0';
export default '1.26.1';

View File

@@ -13,6 +13,8 @@ services:
- DATABASE_URL=postgresql://user:password@postgres:5432/planka_db
- SECRET_KEY=notsecretkey
# - LOG_LEVEL=warn
# - TRUST_PROXY=0
# - TOKEN_EXPIRES_IN=365 # In days

View File

@@ -15,6 +15,8 @@ services:
- DATABASE_URL=postgresql://postgres@postgres/planka
- SECRET_KEY=notsecretkey
# - LOG_LEVEL=warn
# - TRUST_PROXY=0
# - TOKEN_EXPIRES_IN=365 # In days

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "planka",
"version": "1.26.0",
"version": "1.26.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "planka",
"version": "1.26.0",
"version": "1.26.1",
"hasInstallScript": true,
"license": "AGPL-3.0",
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "planka",
"version": "1.26.0",
"version": "1.26.1",
"private": true,
"homepage": "https://plankanban.github.io/planka",
"repository": {

View File

@@ -6,6 +6,7 @@ SECRET_KEY=notsecretkey
## Optional
# LOG_LEVEL=warn
# LOG_FILE=
# TRUST_PROXY=0

View File

@@ -6,16 +6,13 @@ const winston = require('winston');
*/
const defaultLogTimestampFormat = 'YYYY-MM-DD HH:mm:ss';
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.
*
* Refer {@link https://github.com/winstonjs/winston#logging here}
* for more information on Winston log levels.
*/
const logLevel = 'warn'; // process.env.NODE_ENV === 'production' ? 'info' : 'debug';
const logLevel = process.env.LOG_LEVEL || 'warn';
const logFormat = winston.format.combine(
winston.format.uncolorize(),
@@ -23,13 +20,15 @@ const logFormat = winston.format.combine(
winston.format.printf((log) => `${log.timestamp} [${log.level[0].toUpperCase()}] ${log.message}`),
);
const logFile = process.env.LOG_FILE || `${process.cwd()}/logs/planka.log`;
// eslint-disable-next-line new-cap
const customLogger = new winston.createLogger({
transports: [
new winston.transports.File({
level: logLevel,
format: logFormat,
filename: logfile,
filename: logFile,
}),
new winston.transports.Console({
level: logLevel,