9
responses
responses
I have tried multiple ways to get the wildcard includes to work but just cant get it to work in CE. If I put the path in then it works.
define ROOT C:\Program Files (x86)\nxlog
define PLUGIN %ROOT%\additional
works:
include C:\Program Files (x86)\nxlog\additional\nxlog_exchange.conf
doesn't work:
include additional\*.conf
include additional/*.conf
include %PLUGIN%\*.conf
include %PLUGIN%/*.conf
Comments (8)
Not just includes but also inputs.
Example:
<Input iis_w3c>
Module im_file
File 'C:\inetpub\logs\LogFiles\W3SVC*\u_ex*.log'
<Exec>
if $raw_event =~ /^#/ drop();
else
{
csv_w3c_parser->parse_csv();
$EventTime = parsedate($date + "T" + $time + ".000Z");
}
</Exec>
</Input>
Error:
2020-07-16 13:03:31 ERROR failed to open directory: C:\inetpub\logs\LogFiles\W3SVC*: The filename, directory name, or volume label syntax is incorrect.
2020-07-16 13:03:31 ERROR failed to open directory: C:\inetpub\logs\LogFiles\W3SVC*: The filename, directory name, or volume label syntax is incorrect.
But the directories do work. They are W3SVC1 and W3SVC2
Also I found the problem on the INCLUDES.
This works:
include %ROOT%\additional\nxlog_*.conf
This doesn't work:
include %ROOT%\additional\*.conf
Hello,
Second
INCLUDE
directive don't work because of unescaped character\
.Regarding files - could you please double check that there no errors in the path?
Regards, Arch
ah that makes sense. So I would need to do this:
include %ROOT%\additional\\*.conf
or
include %ROOT%\\additional\\*.conf
I checked the path and it is legit. There is a W3SVC1 and W3SVC2 folder in c:\inetpub\logs\Logfiles
Hi,
You can't use wildcards with directory names in the CE edition since it's not supported. For
file
you can useRecursive
to obtain a similar effect, however, it seems to not work withinclude
, please check the answer:https://nxlog.co/question/2399/multiple-wildcards-path-logfile
and also, refer to the manual.
One of the other possible solutions would be dynamically generated conf files by an external script, that might be not really elegant - but could work.
Regards,
Rafal
Where is this documented? I am not sure if i am looking into the right documentation.
Thanks, Felix
Hi Felix,
You may check the paragraph "Recursive" in https://nxlog.co/docs/nxlog-ce/nxlog-reference-manual.html
Best,
Rafal
deleted