Skip to content

vogro-x/vogro-logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

the logger module of vogro.

run test

$ cd vogro-logger/test && make logger

usage

#include "../include/vogro_logger.hpp"

int main(void) {

  Logger<FilePolicy> &file_logger =
      Logger<FilePolicy>::getLoggerInstance("vogro.log");
  for (auto i = 0; i < 10; i++) {
    file_logger.LOG_INFO("hello", "vogro-logger");
    file_logger.LOG_DEBUG("hello", "vogro-logger");
    file_logger.LOG_WARN("hello", "vogro-logger");
    file_logger.LOG_ERROR("hello", "vogro-logger");
  }

  Logger<TerminalPolicy> &terminal_logger =
      Logger<TerminalPolicy>::getLoggerInstance("placehold");
  for (auto i = 0; i < 10; i++) {
    terminal_logger.LOG_INFO("hello", "vogro-logger", 200);
    terminal_logger.LOG_DEBUG("hello", "vogro-logger", 200);
    terminal_logger.LOG_WARN("hello", "vogro-logger", 200);
    terminal_logger.LOG_ERROR("hello", "vogro-logger", 200);
  }

  return 0;
}

Releases

No releases published

Packages

No packages published