VYBECODEDDDDDDDDD
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
export type LogLevel = "info" | "warn" | "error";
|
||||
|
||||
export function log(level: LogLevel, message: string): void {
|
||||
const line = `[${new Date().toISOString()}] [${level}] ${message}`;
|
||||
if (level === "error") {
|
||||
console.error(line);
|
||||
} else {
|
||||
console.log(line);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user