Search code examples
nxlog

Windows nxlog - Wildcard Directories in Config File


I have the following folder structure:

-job-folders
    -1
        -log.txt
    -2
        -log.txt
    -3  
        -log.txt

I want to do watch log.txt in all of the above job folders. I am currently using:

<Input my-log>
    Module im_file
    File "C:\job-folders\*\log.txt"  
    SavePos TRUE
    Recursive TRUE
</Input>

In nxlog.log, I get

2015-12-21 12:10:25 ERROR apr_stat failed on file C:\job-folders\*\log.txt; The filename, directory name, or volume label syntax is incorrect.

I know it says explicitly that directory names cannot be wildcarded at https://nxlog.co/docs/en/nxlog-reference-manual.html#im_file_config_file

Is there a way around this?


Solution

  • The pattern I was looking for was

    File "C:\job-folders\\\*log.txt"