I have to use nxlog to read SAS log file from SAS Guide.
It's about more than 1.000 users in my company.

Nxlog is installed on these 1.000 laptops, and the SAS Log files
are under a directory like

-> I can't change this directory ...
-> A012345 is an exemple of the employee number.
So, I have one different directory for all 1.000 laptops.

I have to find a solution to bypass these employee numbers variable
and find a generic expression to access to this directory.

So, I can't use a wildcard directly in log directory
(c:\Users\*\Logs\*.log), nxlog can't do that.

I have a solution by using a Windows Shortcut.

I create a shortcut
"D:\Temp\SAS-Logs\" with a link to my official directory

And my nxlog input with im_file works perfectly.

Now, I'm faced to another problem.
I must manage the SAS logs file retention.

I'm testing the file_remove function.
When I specify my official directory (c:\Users\A012345\Logs\*.log), it works perfectly.
When I'm using the same shortcut (which works with my Im_file),
nxlog says he can't find the directory.

What is a the problem, the file_remove function uses another library ?

Do you any idea to suppress my "old" sas log file with nxlog ?


AskedOctober 22, 2021 - 8:59am

Answer (1)


I don't know the detail of implementation, but probably the best solution here would be migration to NXLog Enterprise Edition, which - among others - supports wildcards in directory names on Windows. You can check the trial for free, getting also some additional help from engineers.

Best regards,