slog icon indicating copy to clipboard operation
slog copied to clipboard

Implement slog::Value for std::sync::LazyLock

Open TheJokr opened this issue 3 months ago • 1 comments

This impl allows using LazyLock like an FnValue. The notable difference is that LazyLock memoizes the function's result, whereas FnValue generates a fresh result every time. This is relevant when values are stored in a Logger for multiple log calls.

Closes #360

TheJokr avatar Oct 10 '25 10:10 TheJokr

Thank you! I will squash & merge this before the v2.9.0 release :)

Techcable avatar Oct 11 '25 10:10 Techcable