An open API service indexing awesome lists of open source software.

https://github.com/osfabias/olog.c

c logging library
https://github.com/osfabias/olog.c

c c99 log logger logging

Last synced: over 1 year ago
JSON representation

c logging library

Awesome Lists containing this project

README

          

# olog.c
Cross-platform logging library for C99.

![example showcase](docs/example.png)

#### Example
```c
#include "olog.h"

int main(void)
{
olog_config config = {
.file_path = "logs.txt",
.level = OLOG_LEVEL_TRACE,
};

olog_init(config);
olog_info("hello, world!");
olog_deinit();

return 0;
}
```

#### How to use with CMake
```cmake
add_subdirectory(olog)
...
target_link_libraries( olog)
```

#### How to build
```sh
cmake -B build .
cmake --build build
```