Fix logging
This commit is contained in:
parent
9293c92e58
commit
6b5deae129
2 changed files with 5 additions and 3 deletions
|
|
@ -27,7 +27,6 @@ export async function cmFetchRaw(
|
|||
if (!response.ok && !ignoreStatuses?.includes(response.status)) {
|
||||
throw new Error("Request failed");
|
||||
}
|
||||
logger.log("debug", response); // debug: cmFetch response logging
|
||||
|
||||
return response;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,15 @@ const logger = winston.createLogger({
|
|||
// - Write all logs with importance level of `error` or higher to `error.log`
|
||||
// (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`
|
||||
// (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" }),
|
||||
],
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue