I am attempting to use a wildcard to include multiple config files on Windows. I have noted the syntax from the help file (which seems to be unix specific) but can't get it to work on Windows.

This works:

include %CONFDIR%\example\example.conf

This does not produce any error, but also doesn't work:

include %CONFDIR%\example\*.conf

I've also tried using the full path instead of the variable, forward slashes instead of backward slashes, with and without quotes, escaping the *, etc. Variously it either gives an error and won't start nxlog or it starts but doesn't read the included file(s).



Support ticket opened onJanuary 19, 2017 - 11:52am

Comments (2)

  • b0ti's picture

    State: closed -> active

    Unfortunately the same rules apply here as for im_file's File with respect to escaping, so the \* is treated as a literal asterisk instead of the wildcard character.

    The following should work:

    include %CONFDIR%\example\\*.conf

    This escaping on windows will probably be disabled in a future version as it seems to be causing much confusion.

    January 20, 2017 - 10:24am
  • James's picture

    State: active -> closed

    That's one combination I hadn't thought to try. It works! Thanks a lot.


    January 20, 2017 - 2:43pm