WIP: Major Update 0.2 #3
2 changed files with 5 additions and 3 deletions
Fix logging
commit
6b5deae129
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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" }),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue