1. Volodymyr Shamray
  2. plog

Wiki

Clone wiki

plog / Home

PLog is a C++ logging library. The main purposes of the library are to be simple and extendable. PLog logging API provides such features as logging into different destinations (file, C++ stream, debug output, custom interface), formatting into plain text or CSV, filtering messages by severity level, conditional logging.

The library is distributed under terms of the MIT license.

PLog itself has no external dependencies apart from C++ standard library. Yet, if you want to build the tests, you’re going to need Boost.Test from Boost libraries.

PLog is not cross-platform yet (though we’re planning to make it cross-platform). Unfortunately, it supports only Windows so far.

For those who don’t want to read lots of boring text, here’s the simplest example of how to use the library:

#include "plog/log.h"
 
int main()
{
    plog::init(L"example.log", plog::debug);
 
    // ...
    LOG(plog::info) << "Hello, world!";
    return 0;
}

To learn more about using PLog, there are several tutorials that will help you.

Tutorials

Basic Usage

Circular File Queue

Writing your own init function

Updated