Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frame/g/Dump: It is recommended to enhance the log friendliness of g.Dump. #3630

Open
lingcoder opened this issue Jun 5, 2024 · 1 comment

Comments

@lingcoder
Copy link
Contributor

Description

现在的Dump在打印日志时,对部分类型的数据显示不是太友好,特别是字节数组,每个字节都会占用一行。
推荐借鉴或引入 https://github.com/davecgh/go-spew 库来增强g.Dump()

Additional

这是 spew.Dump() 的打印效果:
1717556160981

这是 g.Dump() 效果
28ffc2a772a7e03734c63063470e553

@Issues-translate-bot Issues-translate-bot changed the title frame/g/Dump: 建议增强g.Dump的日志友好度。 frame/g/Dump: It is recommended to enhance the log friendliness of g.Dump. Jun 5, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Description

When printing logs, the current Dump is not very friendly to the display of some types of data, especially byte arrays, where each byte occupies one line.
It is recommended to learn from or introduce the https://github.com/davecgh/go-spew library to enhance g.Dump()

Additional

This is what spew.Dump() prints out:
1717556160981

This is the effect of g.Dump()
28ffc2a772a7e03734c63063470e553

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants