ZLogger

Zero Allocation Text/Strcutured Logger for .NET Core and Unity, built on top of a Microsoft.Extensions.Logging. (by Cysharp)

Reviews and mentions

Posts with mentions or reviews of ZLogger. We have used some of these posts to build our list of alternatives and similar projects.
  • Sharing Saturday #384
    1 project | reddit.com/r/roguelikedev | 15 Oct 2021
    Another bit of work was on setting up a logging system. Unity's logging options look a bit poor, and they're suitable for checking when things go wrong as they print the callstack too, but for logging en masse the log file can reach a gigabyte so that's not fun. So I looked a bit around, I tried to use ZLogger which looked like a performant library but just didn't work, I got annoyed and just wrote a bunch of classes to do logging. I have a base logger class that exposes the interface, and a derived class implements the logging interface. To avoid paying logging costs out of development, I can use the preprocessor to create dummy loggers (empty classes) instead of actual loggers, so that the IL2CPP can optimize them out. At least that's what I hope, this needs testing. And apparently, one thing I learned is that interpolated strings (e.g. $"Hello there, {name}") are a bad idea for logging (although they are super convenient) because the interpolated string gets built immediately, whereas if the log string is passed with its parameters, e.g. Log("Hello there, {0}", some.complex.code.get_name()) and the log string does not need to be written because the log level is not high enough, then the parameters don't get evaluated (citation needed).

Stats

Basic ZLogger repo stats
1
579
6.1
about 1 month ago

Cysharp/ZLogger is an open source project licensed under MIT License which is an OSI approved license.

Find remote C# jobs at our new job board 99remotejobs.com. There are 2 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.