mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Add http logging for express
This commit is contained in:
3 files changed
+14
-2
No files matched your search
@@ -9,7 +9,8 @@ export const levels = Object.freeze({
|
||||
audit: 3,
|
||||
info: 4,
|
||||
server: 5,
|
||||
verbose: 6,
|
||||
http: 6,
|
||||
verbose: 7,
|
||||
});
|
||||
|
||||
export const colors = {
|
||||
@@ -19,6 +20,7 @@ export const colors = {
|
||||
audit: "bold brightGreen",
|
||||
info: "bold brightBlue",
|
||||
server: "bold",
|
||||
http: "bold grey",
|
||||
verbose: "bold grey",
|
||||
} as const;
|
||||
winston.addColors(colors);
|
||||
@@ -163,7 +165,7 @@ export const logger = winston.createLogger({
|
||||
// Who in their right mind thought that log levels should be hard coded
|
||||
// into the type when you can define custom levels you want to support?
|
||||
export type Logger = Omit<winston.Logger,
|
||||
"error" | "warn" | "help" | "data" | "info" | "debug" | "prompt" | "http" | "verbose" | "input" | "silly" |
|
||||
"error" | "warn" | "help" | "data" | "info" | "debug" | "prompt" | "verbose" | "input" | "silly" |
|
||||
"emerg" | "alert" | "crit" | "warning" | "notice" |
|
||||
"child"
|
||||
> & {
|
||||
@@ -173,6 +175,7 @@ export type Logger = Omit<winston.Logger,
|
||||
audit: winston.LeveledLogMethod,
|
||||
info: winston.LeveledLogMethod,
|
||||
server: winston.LeveledLogMethod,
|
||||
http: winston.LeveledLogMethod,
|
||||
verbose: winston.LeveledLogMethod,
|
||||
child(options: object): Logger,
|
||||
};
|
||||
Reference in new issue
Block a user