1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00

fix: Use custom logger only for production

This commit is contained in:
Maksim Eltyshev 2022-08-23 20:45:42 +02:00
parent 33d36d80eb
commit c40709a509
5 changed files with 26 additions and 27 deletions

View file

@ -21,6 +21,8 @@
const url = require('url');
const { customLogger } = require('../../utils/logger');
module.exports = {
/**
*
@ -243,7 +245,24 @@ module.exports = {
*
*/
log: {},
log: {
/**
* Passthrough plain log message(s) to
* custom Winston console and file logger.
*
* Note that Winston's log levels override Sails' log levels.
* Refer: https://github.com/winstonjs/winston#logging
*/
inspect: false,
custom: customLogger,
/**
* Removes the Sail.js init success logs (ASCII ship art).
*/
noShip: true,
},
http: {
/**

View file

@ -64,5 +64,7 @@ module.exports = {
},
},
log: {},
log: {
level: 'warn',
},
};

View file

@ -10,8 +10,6 @@
* https://sailsjs.com/docs/concepts/logging
*/
const { customLogger } = require('../utils/logger');
module.exports.log = {
/**
*
@ -24,20 +22,5 @@ module.exports.log = {
* You may also set the level to "silent" to suppress all logs.
*
*/
/**
* Passthrough plain log message(s) to
* custom Winston console and file logger.
*
* Note that Winston's log levels override Sails' log levels.
* Refer: https://github.com/winstonjs/winston#logging
*/
custom: customLogger,
inspect: false,
/**
* Removes the Sail.js init success logs
* (ASCII ship art) for production instances.
*/
noShip: process.env.NODE_ENV === 'production',
// level: 'info',
};