mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-14 18:00:50 +00:00
25 lines
693 B
TypeScript
25 lines
693 B
TypeScript
import pino from "pino";
|
|
|
|
const isDev = process.env.NODE_ENV !== "production";
|
|
|
|
export const logger = pino({
|
|
level: process.env.LOG_LEVEL || (isDev ? "debug" : "info"),
|
|
...(isDev && {
|
|
transport: {
|
|
target: "pino-pretty",
|
|
options: { colorize: true },
|
|
},
|
|
}),
|
|
});
|
|
|
|
/** Relay server (WebSocket + dispatch). */
|
|
export const relayLog = logger.child({ module: "relay" });
|
|
|
|
/** UDP game connection handshake and protocol. */
|
|
export const connLog = logger.child({ module: "conn" });
|
|
|
|
/** Master server / server list queries. */
|
|
export const masterLog = logger.child({ module: "master" });
|
|
|
|
/** T2csri authentication. */
|
|
export const authLog = logger.child({ module: "auth" });
|