Author: Pascal Withopf <firstname.lastname@example.org>
Target audience are developers and users who need to debug an error with tests.
For debugging with rsyslog.conf see troubleshooting.
Debugging with tests
When you want to solve a specific problem you will probably create a test
and want to debug with it instead of configuring rsyslog. If you want to
write a debug log you need to open the file ../rsyslog/tests/diag.sh
and delete the # in front of the two lines:
export RSYSLOG_DEBUG=”debug nologfuncflow noprintmutexaction nostdout”
A debug log will be written now, but remember to put the # back again
before committing your changes. Otherwise it won’t work.
You can’t use multiple memory debugger at the same time. This will resort
in errors. Also remember to undo all changes in diag.sh after you are done,
because it will also resort in errors if you commit them with your work.
If you want to use Valgrind you need to enable it for tests.
To do that open the file ../rsyslog/tests/diag.sh and delete the #
in front of the line:
valgrind=”valgrind –malloc-fill=ff –free-fill=fe –log-fd=1”
This will enable valgrind and you will have extra debugging in your test-suite.log file.
If you want to use address sanitizer you need to set your CFLAGS. Use this command:
export CFLAGS=”-g -fsanitizer=address”
After this is done you need to configure and build rsyslog again, otherwise it won’t work.
Help with configuring/using
Mailing list - best route for general questions
GitHub: rsyslog source project - detailed questions, reporting issues
that are believed to be bugs with
Stack Exchange (View, Ask)
- experimental support from rsyslog community
Copyright 2008-2020 Rainer Gerhards (Großrinderfeld),