Sitelet https://github.com/clibs/debug
Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

debug

Conditional debug logging for C

install

$ clib install debug

usage

#include "debug.h"

debug_init(app)
debug_init(connection)
debug_init(error)

debug_t app_debug;
debug_t conn_debug;
debug_t err_debug;

int
main (void) {
  app_debug = debug_get(app);
  conn_debug = debug_get(connection);
  err_debug = debug_get(error);

  app_debug("starting application '%s'", "wooooo");

  // more logic later..
  return 0;
}
$ DEBUG=app ./program
app - starting application 'wooooo'

license

MIT

About

Conditional debug logging for C

Resources

Stars

16 stars

Watchers

13 watching

Forks

Releases

Packages

Used by

Contributors

Languages