mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-24 13:52:45 +00:00
send all logs from client to server and log them
This commit is contained in:
+9
-1
@@ -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(),
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user