Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 1.42 KB

File metadata and controls

36 lines (28 loc) · 1.42 KB

CodeFactor Codacy Badge Softacheck Documentation

LoggerLib

Functions

logger_t* create_logger(const char *path)

Creates and returns pointer to the newly created by the logger at specified path

logger_t* get_logger(void)

Returns pointer to the already created logger

bool close_logger(void)

Close the logging library

bool set_max_file_size(size_t max)

Automatically changes the file when max size is reached

Macros

  • TRACE(fmt, ...)
  • DEBUG(fmt, ...)
  • INFO(fmt, ...)
  • WARN(fmt, ...)
  • ERROR(fmt, ...)

Sample Code

create_logger("/va/logs/LoggerTest");
set_max_file_size(KB(3));
get_logger()->trace(__func__, __LINE__, "%s\n", "ftw");
TRACE("%s\n", "Wow!!!");
close_logger();