Skip to content

Latest commit

聽

History

History
53 lines (36 loc) 路 1.87 KB

File metadata and controls

53 lines (36 loc) 路 1.87 KB

Logging

Typing SVG

鈿狅笍 The library is currently under development!

鈥硷笍 The library is temporarily not thread-safe!

Now you can already:

鉁旓笍 Create your own class "writer" for writing according to your preferences (see example);

鉁旓笍 Create your own "formatter" for data output;

鉁旓笍 Carticipate in the development of the library;

鉁旓笍 Contact me for constructive criticism and suggestions for improvement;

How to use (see example):

#include "../include/Logging.h"
#include "TxtWriter.h"
#include "TxtFormatter.h"

int main()
{
    TxtWriter<TxtFormatter> writer("LoggerTest.txt");
    Logging::Logger::init(&writer);

    logf_e("Error message with arg: Num=%d, Str=%s",     1, "Error message");
    logf_w("Warning message with arg : Num=%d, Str=%s",  2, "Warning message");
    logf_i("Info message with arg : Num=%d, Str=%s",     3, "Info message");
    logf_d("Debug message with arg : Num=%d, Str=%s",    4, "Debug message");

    log_e("Error message without args.");
    log_w("Warning message without args.");
    log_i("Info message without args.");
    log_d("Debug message without args.");

    return 0;
}

馃摣 How to reach me:

Linkedin Badge Gmail Badge