Skip to content

SakaDream/C-Logger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C-Logger

Simple colorful C / C++ Logger

List of files

  • log.h: Logger header file without program's execute time
  • logwt.h: Logger header file with program's execute time

How to use

  • Copy log.h, logwt.h and time_printf.o to your source code folder
  • Include log.h or logwt.h to your C source code
  • Link time_printf.o when compile

List of functions

  • debug(Message, [arguments]) : Show debug message
  • log_err(Message, [arguments]) : Show error message
  • log_warn(Message, [arguments]) : Show warning message
  • log_info(Message, [arguments]) : Show info message
  • check(Conditional, Message, [arguments]) : Check if Conditional is false, return Error Message and goto error label
  • check_mem(Object / Variable) : Check Object or Variable created into memory
  • check_debug(Conditional, Message, [arguments]) : Check if Conditional is false, return Debug Message and goto error label
  • sentinel(Message, [arguments]) : Same as log_err() and goto error label

Color

  • Time: Magenta
  • Debug Log: Cyan
  • Error Log: Red
  • Info Log: Default Terminal Text Color

Credits

  • This tool is based on debug tool on the book Learn C The Hard Way by Zed A. Shaw

About

Simple colorful C / C++ Logger

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published