Uh oh!
There was an error while loading. Please reload this page.
Update logging statements for zig std.log breaking change - #147
Conversation
| @@ -1,4 +1,5 @@ | |||
| const std = @import("std"); | |||
| const main_log = std.log.scoped(.main); | |||
There was a problem hiding this comment.
I don't really like that I had to call this one main_log instead of just log like in the other files, since otherwise it would clash with the custom log implementation. I argued for renaming the log implementation to "logger" to prevent this name collision here ziglang/zig#6039 (comment):
The intended usage pattern of
const log = std.log.scoped(.main); log.err("oops", .{});can be used everywhere except in the root source file, if that file overrides the log implementation (since it would result in a naming conflict). Is this a problem? Maybe the log implementation could be renamed to "logger" instead?
Do you have any ideas to improve this, or do you think it's fine the way it is?
alexnask
commented
Aug 14, 2020
Hi, thanks for the contributioin. |
heidezomp
commented
Aug 14, 2020
That's fine, it works again, that's the most important part 😄 |
I implemented ziglang/zig#6046 with breaking changes to std.log and then noticed that my zls wouldn't build anymore... so I made it build again 😄
Marked this PR as draft since the upstream zig PR isn't merged yet.