Hello,
I'm pleased to announce slf4p 1.1.0, a Simple Logging Facade for
(Free) Pascal — a thin abstraction over pluggable logging backends
(LazLogger, Log4D, a bundled SimpleLogger, or none at all), so
application code logs against one small ILogger interface instead of
being coupled to a specific logging framework.
Project:
https://github.com/michaelJustin/slf4pRelease:
https://github.com/michaelJustin/slf4p/releases/tag/v1.1.0License: Apache 2.0
Targets: Lazarus/FPC 4.0+ and Delphi 2009+
What's new in 1.1.0
--------------------
* New ILogEvent/TLogEvent and ILogEventAppender types encapsulating a
single log call (level, logger name, message, args, timestamp,
exception) — groundwork for structured/queryable logging backends.
ILogger's public API is unchanged.
* New TAbstractLogger base class implementing ILogger once; the
SimpleLogger, LazLoggerLogger and StringsLogger backends now derive
from it instead of each re-implementing the full ILogger surface.
* Two new ILogger overloads per level (Debug/Info/Warn/Error/Trace)
for logging one or two TObject arguments directly, e.g.
Log.Debug('found %s', SomeObj) — no array-of-const literal needed.
Uses SomeObj.ToString when overridden, and is skipped entirely when
the level is disabled.
Full changelog:
https://github.com/michaelJustin/slf4p/blob/master/CHANGELOG.mdFeedback, issues and pull requests are welcome.
Regards,
Michael Justin