Add logger to main

+ Remove whitespace
This commit is contained in:
Stephan
2022-04-28 14:39:16 +02:00
parent 9516b60d93
commit 9ac4fb8efd
2 changed files with 7 additions and 2 deletions
+3 -1
View File
@@ -7,7 +7,9 @@ const {
const defaultJsonFormat = combine(errors({ stack: true }), timestamp(), json({ space: 2 }));
const customCLIFormat = printf(({ level, message, label, timestamp, stack }) => {
let output = `${level}${stack ? `(1/2:message)` : ""} at ${timestamp}${label ? ` (#${label})` : ""}: ${message}\n`;
let output = `${level}${stack ? `(1/2:message)` : ""} at ${timestamp}${label ? ` (#${label})` : ""}: ${message}${
stack ? "\n" : ""
}`;
if (stack) {
output += `\n${level}(2/2:stack)${label ? ` (#${label})` : ""}: ${stack}\n\n`;