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

用std::source_location更新Logger的部分实现? #293

Open
neko-para opened this issue Jul 25, 2024 · 4 comments
Open

用std::source_location更新Logger的部分实现? #293

neko-para opened this issue Jul 25, 2024 · 4 comments
Labels
whimsy A bold and amazing idea

Comments

@neko-para
Copy link
Contributor

减少点宏的使用总是好的吧(

@neko-para neko-para added the whimsy A bold and amazing idea label Jul 25, 2024
@MistEO
Copy link
Member

MistEO commented Jul 25, 2024

我感觉已经到位了,你试试

要注意下跨平台编译问题(

@neko-para
Copy link
Contributor Author

改造了一下之后发现internal debug有点不好弄

@neko-para
Copy link
Contributor Author

https://godbolt.org/z/G7Wjxnb4e

刚实现的方案好像会导致在运行时去算文件名, 但是从上面这个代码来看应该是可以做到编译时来着

@neko-para
Copy link
Contributor Author

好像很有点麻烦, 主要是source_location还不能简单的随便乱传

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
whimsy A bold and amazing idea
Projects
None yet
Development

No branches or pull requests

2 participants