dlog

Simple and modular logging library

Usage

We recommend you use dub to add dlog to your project as follows:

dub add dlog

Components

dlog is formed out of two main components:

  1. Logger
    • The logger contains the needed barebones for facilitating the actual logging of text
    • The base logger (i.e. Logger) maintains a list of attaches filters, message transformers and handlers
  2. Filter
    • Acts as a predicate on the incoming message and determines whether it should be logged or not
    • This is used by the BasicLogger to implement log levels
  3. Transform
    • A message transform is attached to a logger and performs manipulation on the message logged
    • They may be chained as to perform multiple transformations in a stream-like fashion
  4. Handler
    • A handler handles the final transformed message, for some this means outputting to standard out, or a file

License

LGPLv3

Navigation