Skip to content

A simple thread safe logger made in C that has good header documentation.

License

Notifications You must be signed in to change notification settings

Immanuel-C/CLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CLog

A simple thread safe logger made in C that has good header documentation.

How to build

CLog does not have any dependenices. The example will only be built if the cmake command CL_BUILD_EXAMPLE is on.

Example

#include <clog.h>

int main(void) {
    // flags must always be 0. It is reserved.
    clog_init(stdout, 0);

    clog_log(CL_TYPE_INFO, "Hello CLog!\n");
    clog_log(CL_TYPE_TRACE, "trace!\n");
    clog_log(CL_TYPE_WARNING, "a warning! %s\n", "CLog");
    clog_log(CL_TYPE_ERROR, "Oh no! %d\n", 10);
    clog_log(CL_TYPE_FATAL_ERROR, "Oh no!\n");

    clog_terminate();

    return 0;
}

About

A simple thread safe logger made in C that has good header documentation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published