Sapeint Logger is a small, but robust and extensible, logging library for usage in C code.
This library is NOT thread safe, to the best knoweldge of the authors. However, if you wish to use it make sure you write your own logging function, and handle the threading stuff. Otherwise it is at your own risk.
- GCC (if you wish to use the makefile)
- Doxygen (if you wish to generate the documentation/man files)
Linux
- Run
git clone https://github.com/sapeint/sapeint_logger.git
- Run
make && make install
- Install it or include logger.c and logger.h in your project tree
- Include
sapeint_logger.h
if you usedmake install
, otherwise includelogger.h
- Read through the Docs
All Copyright belongs to their respective owners.
This code is licensed under the MIT/Expat License, found in LICENSE.
NO!
Yes, at least to the knowledge of the author. It is possible that this is thread safe, but it has not been tested or confirmed. If you require thread safety, you will have to write your own log function, use the USER type, and register your own function through the interface.
Potentially, however it is not a high priority at this time, nor do I know what I would need to do in order for me to make sure it is thread safe.
This is mainly for those that don't use syslog, and syslog is platform dependent in any case. This is also why you can register your own free and log functions. Just use the USER type.
It's to allow for a person to extend the library in a project that might require it.
Yes, but not by that much. It only adds in 22 LoC at most, and is only ~18% of the codebase. So removing it only removes a small portion of the code, and the upkeep is extremely negligible, given that most of the code is relatively simple.