Skip to content

SanCloudLtd/femtolog

Repository files navigation

femtolog

A simple logging library based on log.c by rxi.

Usage

This library may be built and installed using CMake. Alternatively, if your application is also built using CMake, this repository can be included as a subdirectory to give a more tightly coupled project.

To use this library from a C/C++ application, follow these simple steps:

  1. Include femtolog.h from your C/C++ source files.

  2. Implement an output function which matches the femtolog_output_fn type.

  3. Call femtolog_init() early in your main function.

  4. Use the appropriate log_*() functions to emit log messages.

Additional configuration macros can be defined to customise the behaviour of femtolog as documented in the header file.

Example usage is provided in femtolog-example.c and HTML documentation can be built using doxygen.

Maintainers

Contributing

Issues and Pull Requests for this project may be opened on our primary GitHub repository at https://github.com/SanCloudLtd/femtolog. When submitting a pull request, all commits should include a Signed-off-by line to indicate that your contribution is made in accordance with the Developer Certificate of Origin.

License

Copyright (c) 2021-2022 SanCloud Ltd.