Directory wildcards/following
Hi,
I am evaluating nxlog on Windows but I've run into a snag.
I have logs organized like this:
D:\ServerLogs\2015-07-16\*.log
Where the directory is rotated based on today's date. Now, if I use the recursive parameter set to true for the file watcher, including this
D:\ServerLogs\*.log
works. However, I don't want to include all files dues to size and/or relevance. I only want to include some of them. As far as I can gather, the recursive parameter only works when there's a wildcard on the filename.
What I need is to be able to include the following:
D:\ServerLogs\*\Log1.log
so it follows the directory rotation on that file alone. I can't figure out how to accomplish this with nxlog.
Please advise.
Thank you.
While continuing the evaluation I find that I could theoretically check file_name() to see if it includes the files I want to log (drop() otherwise) and then do a recursive watch on *.log in the top directory.
Although this might fall in the "ugly hack" category, since certain non wanted logs can reach 1Gb+ and I don't know how nxlog likes that in terms of resource usage etc :)