Boost.Log - logging critical application errors

I am using Boost.log in my application. When repeatedly logging in repeatedly, the registration operation should not be blocked, so I register it with this receiver:

    boost::log::sinks::ordering_asynchronous_sink

to this interface file:

    boost::log::sinks::text_file_backend

The main purpose of registration is to view critical errors to diagnose a failure. However, I noticed that the entries are written to the file only once in a while (when a certain number of entries were probably added), which means that a sudden failure will not leave any log entries explaining this.

What can i do here? Can I force a file to be written for Fatal severity errors? The best approach?

+3
source share
1

, . ( ), , . auto_flush, , , . . docs.

+2

All Articles