Revert "Improving log messages"
This commit is contained in:
parent
6c5f330b71
commit
6e6cdc7bde
38 changed files with 203 additions and 581 deletions
|
@ -1,6 +1,5 @@
|
|||
import { HttpResponse } from "uWebSockets.js";
|
||||
import { FRONT_URL } from "../Enum/EnvironmentVariable";
|
||||
import log from "../Services/Logger";
|
||||
|
||||
export class BaseController {
|
||||
protected addCorsHeaders(res: HttpResponse): void {
|
||||
|
@ -21,12 +20,12 @@ export class BaseController {
|
|||
} else {
|
||||
url = "";
|
||||
}
|
||||
log.error("ERROR: " + e.message + url);
|
||||
console.error("ERROR: " + e.message + url);
|
||||
} else if (typeof e === "string") {
|
||||
log.error(e);
|
||||
console.error(e);
|
||||
}
|
||||
if (e.stack) {
|
||||
log.error(e.stack);
|
||||
console.error(e.stack);
|
||||
}
|
||||
if (e.response) {
|
||||
res.writeStatus(e.response.status + " " + e.response.statusText);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue