Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.87 KB

README.md

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