I'm new to nxlog. I have recently installed nxlog in my local system and tried to copy nxlog log file which is available in a default location to another location in my machine.
Is this feasible using nxlog?

AskedApril 3, 2019 - 11:40pm

Answer (1)

If you are simply looking to store the nxlog.log file in another location, you could update the LOGFILE define or its associated LogFile directive:

define LOGFILE /var/log/nxlog/nxlog.log

If instead, what you are wanting to do is to duplicate the nxlog.log file to another file (maybe to test out NXLog features) then you could do the following (assuming you are using a define as above, or replace with actual path)

<Input nxlog_log>  
    Module  im_file  
    File  %LOGFILE%  
<Output newfile>  
    Module  om_file  
    File  "/tmp/output.log"  
<Route copy_log>
    Path  nxlog_log => newfile

Comments (1)