include directive does _not_ allow wildcard character '*' in Windows
I'm trying to set up nxlog on a windows host and break out configuration files for specific applications. I followed the example in the documentation ( https://nxlog.co/documentation/nxlog-user-guide/ref-config.html#config_general_include ) but when I include a wildcard character, the nxlog service fails to start with the following error in the log file:
nxlog failed to start: Invalid 'include' directive at c:\Program Files (x86)\nxlog\conf\nxlog.conf:19 Failed to open config file C:\Program Files (x86)\nxlog\conf\nxlog.d*.conf The filename, directory name, or volume label syntax is incorrect.
The nxlog.d sub-directory exists and I have an application-specific config file there. If I specify the filename explicitly, the nxlog service starts. I'd like to use the wildcard in the main nxlog.conf file so I can scale this to multiple servers with different apps.
Hi Krzysztof,
First of all, when using Community Edition, it's usually safer to refer to CE's documentation - you've referred to the NXLog Enterprise Edition documentation. While many things may be fine, there're significant differences between these two version, what may be sometimes misleading. That's the CE docs: https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html
With respect to you wildcard, please note that while using Windows - escaping chars may be the issue, as stated, for instance, in a note for File directive. From this note you may see that in case of Windows machines, one needs to use rather C:\\test\\*.log
than C:\\test\*.log
, since due to escaping - the latter becomes literal asterisk.
Hope this helps,
Raf