I am implementing configuration for nxlog to read from a file and write to UDP socket. I am also implementing to check if nxlog failed to forward log messages, then it should write in its log. For this case, I am using buffer and checking buffer count to log the message. I checked it by unplugging the network cable and it is not working. Please review following code.
Exec log_info("In Buffer" + buffer_count());
Exec if buffer_count() > 2 \
# Exec log_info("Reading File");
Path in_WebAdmin => buffer_Check => out_WebAdmin
In above configuration, it should log the message "Route Failover" in case nxlog is not forwarding log messages and nxlog is storing log messages in buffer. Please review it and let me know the solution as soon as possible.