DLog provider implementation for SLF4D
Go to file
Andrew Lalis 2010008489 updated dependencies. 2023-03-19 08:05:20 +01:00
source/slf4d_dlog updated dependencies. 2023-03-19 08:05:20 +01:00
.gitignore Added initial implementation. 2023-03-02 10:08:47 +01:00
LICENSE Initial commit 2023-03-02 08:51:33 +01:00
README.md Improved readme. 2023-03-02 11:22:29 +01:00
dub.json updated dependencies. 2023-03-19 08:05:20 +01:00
dub.selections.json updated dependencies. 2023-03-19 08:05:20 +01:00

README.md

SLF4D-DLog

An SLF4D provider for the DLog logging library.

Getting Started

The following snippet shows all that's needed to start logging with the DLog provider for SLF4D:

import slf4d;
import slf4d_dlog;

auto dlogProvider = new shared DLogProvider();
configureLoggingProvider(dlogProvider);

auto log = getLogger();
log.info("This message will be handled by DLog.");

You can customize DLog's behavior by providing a custom Logger or MessageTransform when constructing the DLogProvider:

auto customizedProvider = new shared DLogProvider(myCustomLogger);
auto otherProvider = new shared DLogProvider(myCustomMessageTransform);

Thread-Safety

Because DLog is designed for single-threaded use only, this provider synchronizes access to the underlying DLog logger such that only one thread may access it at a time.