0
我對帆v0.11.5工作,使用的顏色:在development.js假弄乾淨日誌無色差值編碼期待:從sailsjs v0.12.13日誌刪除顏色代碼
var winston = require('winston');
var logDir = '/var/log/nginx';
var applicationLogger = new winston.Logger({
transports: [
new(winston.transports.File)({
level: 'info',
filename: logDir + '/application.log'
})
]
});
module.exports = {
log: {
colors: false, // To get clean logs without prefixes or color codings
custom: applicationLogger
}
};
現在我的工作帆v0.12.13並使用相同的配置顏色:假的,但這次我得到的顏色代碼在日誌
var winston = require('winston');
var logDir = '/var/log/nginx';
var applicationLogger = new winston.Logger({
transports: [
new(winston.transports.File)({
level: 'info',
filename: logDir + '/application.log'
})
]
});
module.exports = {
log: {
colors: false, // To get clean logs without prefixes or color codings
custom: applicationLogger
}
};