Simple file transfer using nxlog


#1 Sangeetha

Hi,

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?

#2 Zhengshi Nxlog ✓
#1 Sangeetha
Hi, 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?

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
LogFile %LOGFILE%

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%  
</Input>  
<Output newfile>  
    Module  om_file  
    File  "/tmp/output.log"  
</Output>  
<Route copy_log>
    Path  nxlog_log => newfile
</Route>