The code is organized into:
- Core library (
libdirectory). - Plugin drivers (
modulesdirectory).
The configuration language is defined in lib/cfg-grammar.y and module related ...-grammar.ym files.
Supported build systems are Autotools and CMake.
Testing:
- Unit tests use the Criterion framework and can be found alongside its respective source code (
.../testsdirectory). - End-to-end tests are written in Python with pytest (
tests/lightdirectory).
Packaging:
- Located in the
packagingdirectory, including Alpine-based container images, Helm charts, and Debian/RPM packages.
AxoSyslog uses ivykis for the main event loop.
Logs are received from local/remote sources, processed with transformations (parsers, rewrites, filters, or filterx), and routed to destinations.
sources can be:
- Non-blocking, socket-based (see
lib/logreader). - Blocking, threaded (see
lib/logthrsource).
destinations can be:
- Non-blocking, socket-based (see
lib/logwriter). - Blocking, threaded (see
lib/logthrdest).
AxoSyslog is mainly written in C, with an object-oriented approach. Some modules are implemented in C++, Python or Java.
AxoSyslog follows clean coding principles:
- Functionality is layered in abstractions to enhance readability and maintainability.
- Function and variable names are descriptive to accurately communicate each layer's purpose.
AxoSyslog follows GNU standards with additional conventions:
- Classes are in PascalCase, functions and variables in snake_case.
- Class namespaces are prefixed in function names.
- Private methods are
staticand start with an underscore (_). - Function signatures are split into two lines (return type on the first, rest on the second) to help
git grep ^my_func_implsearches. - For more info, see Patches.
- Each commit is atomic and detailed in the commit message.
- Commits represent the logical buildup of a feature, organized via interactive rebase to improve readability and maintainability.
- For more info see Commits.
- Comments are rarely used, as clean coding and atomic commits are the main ways to document the code.
- Use comments where architectural overviews are needed or when interface contracts cannot be enforced.
AxoSyslog thrives for the highest quality, but supports developing features incrementally:
- Core abstractions or widely dependent code must be clean, optimized, and well-tested.
- Self-contained features may have relaxed standards but are iterated upon for improvement.