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
+9 -1
View File
@@ -48,6 +48,14 @@ export type GameRecord = z.infer<typeof GameRecordSchema>
const PlayerTypeSchema = z.nativeEnum(PlayerType);
export enum LogSeverity {
Debug = 'DEBUG',
Info = 'INFO',
Warn = 'WARN',
Error = 'ERROR',
Fatal = 'FATAL'
}
// TODO: create Cell schema
export interface Lobby {
@@ -216,7 +224,7 @@ const ClientBaseMessageSchema = z.object({
export const ClientLogMessageSchema = ClientBaseMessageSchema.extend({
type: z.literal('log'),
severity: z.enum([''])
severity: z.nativeEnum(LogSeverity),
log: z.string(),
})