Stumpless at a glance
Stumpless is a C logging library built for high performance and a rich feature set.
Stumpless has lots of features that make logging in C fast and easy:
- log to lots of things including Splunk, rsyslog, journald, the Windows Event Log, sqlite, and more!
- structured and unstructured logging to suit your needs
- builds on Linux, Windows, Mac, FreeBSD, MinGW, MSYS2, Cygwin, DOS, and more!
- thread safe
- can be adjusted or removed during compilation for zero runtime cost
- localized for multiple languages ๐ฆ๐ฑ ๐ง๐ท ๐ง๐ฌ ๐จ๐ณ ๐จ๐ฟ ๐ฉ๐ช ๐ฉ๐ฐ ๐ช๐ธ ๐ซ๐ท ๐ฌ๐ท ๐ญ๐บ ๐ฎ๐ณ ๐ฎ๐ฑ ๐ฎ๐น ๐ฏ๐ต ๐ฐ๐ช ๐ต๐ฑ ๐ธ๐ฐ ๐ฑ๐ฐ ๐ธ๐ช ๐น๐ท ๐บ๐ธ
- easy-access documentation, examples, and support.
Check out our vision to see our ultimate goal! To see where weโre heading in the near future, check out the project roadmap.
What can it log to?
A primary goal of this library is to provide a consistent logging interface to a wide variety of log targets. This means you can focus on defining events and where you want them to go, without finding other SDKs or adding daemons and plugins to get them where you want. Stumpless can write logs to:
- Simple character buffers
- Files and streams
- Unix sockets (such as a local syslog daemon)
- Network servers (IPv4 or IPv6, TCP or UDP)
- Systemd Journald service
- Sqlite3 databases
- Windows Event Log
- Custom functions, for whatever else you may need!
Donโt see what you need? Create an issue with your request and weโll work it into our plans!
Examples and Documentation
If youโre just looking to start out, then take a look at some of the examples
below. There is source code for each of these in the docs/examples
folder of
the repository if you want to actually compile and run them.
- Basic Usage
- Using Severity Levels
- Working with Entries
- Filtering Logs
- Chain Targets
- File Targets
- Journald Targets
- Network Targets
- Unix Socket Targets
- Sqlite Targets
- Stream Targets
- Windows Event Log Targets
- Custom Function Targets
- C++ Bindings
Detailed documentation of each function is included in the header files, and is
written using standard Doxygen syntax. You can generate the documentation
yourself with the docs
build target, or you can look at one of the online
builds below:
Source and Contributing
If you want to check out the source code and/or look into becoming a contributor to stumpless, head over to the projectโs github repository to find out more!