mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
Adding forcable logs
This commit is contained in:
parent
a7f5d6fb5b
commit
9cbcedea0a
@ -10,7 +10,7 @@ import * as child_process from 'child_process';
|
||||
// @ts-ignore
|
||||
import * as jeditor from 'gulp-json-editor';
|
||||
import {XLIFF} from 'xlf-google-translate';
|
||||
import {Config, PrivateConfigClass} from './src/common/config/private/Config';
|
||||
import {PrivateConfigClass} from './src/common/config/private/Config';
|
||||
import {ConfigClassBuilder} from 'typeconfig/src/decorators/builders/ConfigClassBuilder';
|
||||
|
||||
const execPr = util.promisify(child_process.exec);
|
||||
|
@ -48,7 +48,7 @@
|
||||
"sqlite3": "4.1.1",
|
||||
"ts-exif-parser": "0.2.1",
|
||||
"ts-node-iptc": "1.0.11",
|
||||
"typeconfig": "2.0.9",
|
||||
"typeconfig": "2.0.10",
|
||||
"typeorm": "0.2.21",
|
||||
"winston": "2.4.4"
|
||||
},
|
||||
|
@ -2,10 +2,12 @@ import * as winston from 'winston';
|
||||
import {Config} from '../common/config/private/Config';
|
||||
import {ServerConfig} from '../common/config/private/PrivateConfig';
|
||||
|
||||
const forcedDebug = process.env.NODE_ENV === 'debug';
|
||||
|
||||
export const winstonSettings = {
|
||||
transports: [
|
||||
new winston.transports.Console(<any>{
|
||||
level: ServerConfig.LogLevel[Config.Server.Log.level],
|
||||
level: forcedDebug === true ? ServerConfig.LogLevel.silly : ServerConfig.LogLevel[Config.Server.Log.level],
|
||||
handleExceptions: true,
|
||||
json: false,
|
||||
colorize: true,
|
||||
|
Loading…
Reference in New Issue
Block a user