NXlog just read access the logfile, or .... ? [Win2012]

Tags:

#1 JanVerhaag

Hi all,

I've set up nxlog (4.1.4016) to monitor a logfile that is been written to constantly. For some reason, when i start nxlog, the programm that creates the loglines no longer adds info to the existing log. A simple commandline 'echo logline >> thelog.txt' does add the line to the logfile (and processed by nxlog), but other logging is not added. As soon as I stop the NXLog service, the log is modified again.

NXLog is running as system, the programm is running as a normal user.

Any suggestions for troubleshooting would be welcome, as I have no clue what is happening.

#2 camharrisDeactivated Nxlog ✓
#1 JanVerhaag
Hi all, I've set up nxlog (4.1.4016) to monitor a logfile that is been written to constantly. For some reason, when i start nxlog, the programm that creates the loglines no longer adds info to the existing log. A simple commandline 'echo logline >> thelog.txt' does add the line to the logfile (and processed by nxlog), but other logging is not added. As soon as I stop the NXLog service, the log is modified again. NXLog is running as system, the programm is running as a normal user. Any suggestions for troubleshooting would be welcome, as I have no clue what is happening.

Hello,

It seems like the issue you are experiencing is related to your application trying to obtain an exclusive file lock. NXLog's im_file module does not lock log files, however, when running it does leave an open filehandle. This has been known to cause issues with some applications that require an exclusive file lock in order to write. I'd recommend setting the CloseWhenIdle directive to True within your im_file Input. Please refer to here for more information about CloseWhenIdle