openkruise/kruise-game

建议支持配置日志格式,支持 JSON 格式的结构化日志

Opened this issue · 0 comments

我们使用 kibana 查找日志,只支持 JSON 格式的结构化日志,建议增加日志格式配置,支持配置为 JSON 格式输出,示例如下:

{"time":"2024-05-31T04:23:41.168044065Z","level":"INFO","source":{"function":"github.com/CloudNativeGame/kruise-game-open-match-director/pkg/logger.InfoContext","file":"/go/src/director/pkg/logger/logger.go","line":56},"msg":"begin FetchMatches","traceid":"3bc82e362d67a3cf6c55a9104d24456e","sampled":true}