aboutsummaryrefslogtreecommitdiff
path: root/src/util/logger.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/logger.ts')
-rw-r--r--src/util/logger.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/logger.ts b/src/util/logger.ts
index bafb829..d108ae0 100644
--- a/src/util/logger.ts
+++ b/src/util/logger.ts
@@ -1,4 +1,6 @@
import winston from "winston";
+import { Format } from "logform";
+import * as Transport from "winston-transport";
const { combine, splat, timestamp, label, colorize, printf } = winston.format;
const { Console } = winston.transports;
@@ -7,7 +9,13 @@ const LOG_LEVEL = process.env.LOG_LEVEL || "info";
/**
* Provides standard logging format and output for the server.
*/
-export default (clazz: string, level: string = LOG_LEVEL) => ({
+export default (
+ clazz: string,
+ level: string = LOG_LEVEL
+): {
+ format: Format;
+ transports: Transport[];
+} => ({
format: combine(
splat(),
timestamp(),