[rsyslog] Problems with IncludeConfig

Michael Biebl mbiebl at gmail.com
Fri Dec 14 17:24:02 CET 2007

2007/12/14, Michael Biebl <mbiebl at gmail.com>:
> 2007/12/13, Rainer Gerhards <rgerhards at hq.adiscon.com>:
> > Lol... the initial message seems not to have passed my spam filter... ;)
> >
> > I, too, tend to option three. The problem, though is
> Yeah, it's the most flexible one.
> > backwards-compatibility... Any suggestions and concerns are appreciated.
> This feature has been pretty new, and as such probably isn't widely used.
> I would simply emphasize this change in the release notes and the Changelog.
> The worst that can happen is, that a file is not included anymore.
> >
> > I'll look at the code to see how much work that creates. I think the
> > complexity is quite acceptable. I am right now in a threading redesign,
> > so I'd like to push this away for a little while... Anyhow, please keep
> > comments floating - I'll listen and drop in any thoughts I have.
> Should be fairly straightforward to implement using
> http://www.gnu.org/software/libc/manual/html_node/Globbing.html#Globbing

Small example using glob:

#include <glob.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(int argc, char **argv)
        glob_t files;
        int ret = 0;
        int i = 0;
        char *path;

        if (argc > 1) {
                path = argv[1];
        } else {
                path = strdup("/etc/rsyslog.d/*.conf");

        ret = glob(path, GLOB_ERR, NULL, &files);
        printf("All files matching %s:\n", path);
        for (i = 0; i < files.gl_pathc; i++) {
                printf("\t%s\n", files.gl_pathv[i]);


        return EXIT_SUCCESS;

man 3 glob has more information.

If wanted, I can prepare a patch for rsyslog.

Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

More information about the rsyslog mailing list