nxlog: configure pm_buffer
1) declare the processors and pm_buffer configs
memory: max 50MB, log warning at 10MB
disk: max 1GB, log warning at 768MB
“..\LocalService\Local Settings\Temp” should actually be replaced with the full path.
<Processor membuffer> Module pm_buffer MaxSize 102400 Type Mem WarnLimit 25600 </Processor> <Processor diskbuffer> Module pm_buffer MaxSize 1048576 Type Disk File "..\LocalService\Local Settings\Temp" WarnLimit 786432 </Processor>
2) declare route
<Route 1> Path in => diskbuffer => membuffer => out </Route>
Re-route if MEM reaches MaxSize
According to Botand, the above route will backpressure against membuffer, never writing to diskbuffer until membuffer reaches MaxSize.
I’ve investigated with process monitor, and it is true. No writes take place to the buffer file with the above route.