WIP: Major Update 0.2 #3

Draft
Hannah wants to merge 19 commits from Devbranch into main
2 changed files with 5 additions and 3 deletions
Showing only changes of commit 6b5deae129 - Show all commits

Fix logging

Hannah dagemark 2026-09-15 22:42:08 +02:00

View file

@ -27,7 +27,6 @@ export async function cmFetchRaw(
if (!response.ok && !ignoreStatuses?.includes(response.status)) { if (!response.ok && !ignoreStatuses?.includes(response.status)) {
throw new Error("Request failed"); throw new Error("Request failed");
} }
logger.log("debug", response); // debug: cmFetch response logging
return response; return response;
} }

View file

@ -9,12 +9,15 @@ const logger = winston.createLogger({
// - Write all logs with importance level of `error` or higher to `error.log` // - Write all logs with importance level of `error` or higher to `error.log`
// (i.e., error, fatal, but not other levels) // (i.e., error, fatal, but not other levels)
// //
new winston.transports.File({ filename: "error.log", level: "error" }), new winston.transports.File({
filename: "/lib/logging/error.log",
level: "error",
}),
// //
// - Write all logs with importance level of `info` or higher to `combined.log` // - Write all logs with importance level of `info` or higher to `combined.log`
// (i.e., fatal, error, warn, and info, but not trace) // (i.e., fatal, error, warn, and info, but not trace)
// //
new winston.transports.File({ filename: "combined.log" }), new winston.transports.File({ filename: "/lib/logging/combined.log" }),
], ],
}); });