mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 13:59:48 +00:00
send all logs from client to server and log them
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user