kratos
kratos copied to clipboard
feat: slog
adaptation of slog
Shall we using slog.Handler internally instead of slog.Logger? I mean, it will cause caller path issue. 感觉用 slog.Handler 更合适一点。要不然会出 call path 问题。
Code reference:
https://github.com/golang/go/blob/46ea4ab5cb87e9e5d443029f5f1a4bba012804d3/src/log/slog/logger.go#L241-L253
Shall we using slog.Handler internally instead of slog.Logger? I mean, it will cause caller path issue. 感觉用 slog.Handler 更合适一点。要不然会出 call path 问题。
Code reference:
https://github.com/golang/go/blob/46ea4ab5cb87e9e5d443029f5f1a4bba012804d3/src/log/slog/logger.go#L241-L253
You're right. It's more like logger in kratos. It adds call stack.
可能得等到 kratos 版本升到 1.21 之后,这个 PR 才有可能被合并吧……
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
You may have to wait until the kratos version is upgraded to 1.21 before this PR can be merged...
可能得等到 kratos 版本升到 1.21 之后,这个 PR 才有可能被合并吧……
是的,也有可能不会合,内部讨论可能直接将kratos/l og 平替过来
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
You may have to wait until the kratos version is upgraded to 1.21 before this PR can be merged...
Yes, it is possible that it will not work. Internal discussions may directly refer to kratos/l og replaces it