send all logs from client to server and log them

This commit is contained in:
Evan
2024-12-17 19:53:17 -08:00
parent 031f62c701
commit 94992e1144
7 changed files with 50 additions and 25 deletions
+3 -9
View File
@@ -1,12 +1,6 @@
export enum LogSeverity {
DEBUG = 'DEBUG',
INFO = 'INFO',
WARN = 'WARN',
ERROR = 'ERROR',
FATAL = 'FATAL'
}
import { LogSeverity } from "../core/Schemas";
export function slog(eventType: string, description, data: any, severity = LogSeverity.INFO): void {
export function slog(eventType: string, description, data: any, severity = LogSeverity.Info): void {
const logEntry = {
eventType: eventType,
description: description,
@@ -14,7 +8,7 @@ export function slog(eventType: string, description, data: any, severity = LogSe
data: data
};
if (process.env.GAME_ENV == 'dev') {
if (severity != LogSeverity.DEBUG) {
if (severity != LogSeverity.Debug) {
console.log(description)
}
} else {