0
0
Fork 0

Add config option for datetime visibility in the logger

This commit is contained in:
Oliver-Akins 2021-01-09 14:56:23 -07:00
parent bfc5453f28
commit b1331a519b
3 changed files with 6 additions and 1 deletions

View file

@ -25,6 +25,7 @@ export var hibernatedGames: string[] = [];
export var games: {[index: string]: Game} = {}; export var games: {[index: string]: Game} = {};
export const log: Logger = new Logger({ export const log: Logger = new Logger({
displayDateTime: conf.log.datetime,
displayFunctionName: false, displayFunctionName: false,
displayLoggerName: true, displayLoggerName: true,
displayFilePath: `hidden`, displayFilePath: `hidden`,

View file

@ -1,6 +1,7 @@
interface config { interface config {
log: { log: {
level: `silly` | `debug` | `info` | `error` | `warn` | `fatal` | `trace`; level: `silly` | `debug` | `info` | `error` | `warn` | `fatal` | `trace`;
datetime: boolean;
}; };
websocket: { websocket: {
port: number; port: number;

View file

@ -87,4 +87,7 @@ directory = ""
# - "error" # - "error"
# - "trace" # - "trace"
# any other value will prevent the server from starting at runtime. # any other value will prevent the server from starting at runtime.
level = "info" level = "info"
# Whether or not the log should output the date and time information in the log
datetime = true