Our use case read the full unified logs but does not bother about all the logs.
Could be great if we could skip the message formating while reading, but be able and turn the message field of LogData into a message() function that actually Lazy compute the full formatted message on demand.
All our tests are passing just same and fine with this change.
Not sure what I first wanted to do is possible as the log_message formatting sometimes mut the missing parts.
First I'd like to know if you like this mode rust idiomatic style of code (IMHO).
I could have some more rustdiomatic changes to contribute, but perhaps the actual code style was I requirement on your side, that's why I'm asking here.
Hi,
Our use case read the full unified logs but does not bother about all the logs.
Could be great if we could skip the message formating while reading, but be able and turn the
message
field ofLogData
into amessage()
function that actually Lazy compute the full formatted message on demand.I wanted to dig this possibility and just landed a refacto of the LogData creation code => https://github.com/shindan-io/macos-UnifiedLogs/commit/a43b75eb565da4c50eb4c9cba570b483fca10787
All our tests are passing just same and fine with this change.
Not sure what I first wanted to do is possible as the
log_message
formatting sometimesmut
the missing parts.First I'd like to know if you like this mode
rust idiomatic
style of code (IMHO). I could have some morerustdiomatic
changes to contribute, but perhaps the actual code style was I requirement on your side, that's why I'm asking here.