@omnitronix/game-engine-sdk 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnC,qBAAa,MAAO,YAAW,iBAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAMlD,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,aAAa;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/common/logger/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAGpE,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEnC,qBAAa,MAAO,YAAW,iBAAiB;IAC9C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,OAAO,CAAS;gBAEZ,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,SAAS;IAMlD,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,mBAAmB;IAU3B,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,aAAa;IAYrB,OAAO,CAAC,eAAe;IA+BvB,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,aAAa;IAUrB,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,KAAc,EAAE,GAAG,IAAI,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;IAoB5F,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAsB5C,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAI3C,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;IAI5C,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE;CAG/C"}
|
|
@@ -83,7 +83,11 @@ class Logger {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
getTransports() {
|
|
86
|
-
|
|
86
|
+
const logTransports = [new winston_1.transports.Console()];
|
|
87
|
+
if (process.env.LOG_TO_FILE === 'true') {
|
|
88
|
+
logTransports.push(new winston_1.transports.File({ filename: 'logs/app.log' }));
|
|
89
|
+
}
|
|
90
|
+
return logTransports;
|
|
87
91
|
}
|
|
88
92
|
log(message, { level = 'info', ...rest } = {}) {
|
|
89
93
|
switch (level) {
|
|
@@ -80,7 +80,11 @@ export class Logger {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
getTransports() {
|
|
83
|
-
|
|
83
|
+
const logTransports = [new transports.Console()];
|
|
84
|
+
if (process.env.LOG_TO_FILE === 'true') {
|
|
85
|
+
logTransports.push(new transports.File({ filename: 'logs/app.log' }));
|
|
86
|
+
}
|
|
87
|
+
return logTransports;
|
|
84
88
|
}
|
|
85
89
|
log(message, { level = 'info', ...rest } = {}) {
|
|
86
90
|
switch (level) {
|