flow.log et al: Add or modify FATAL-related flow.log / flow.error APIs to possibly auto-abort(). #81
Labels
enhancement
New feature or request
from-akamai-pre-open
Issue origin is Akamai, before opening source
Filed by @ygoldfeld pre-open-source:
The FATAL severity was recently added to flow.log. suggested we could automatically std::abort() upon logging such a message. He also pointed out that perhaps this should be possibly to enable/disable at compile time (some #define) or even run-time. Personally I am not so sure that needs to be provided on a general-library basis (which Flow is); like to me FATAL means we are really screwed – there is no coming back from it maybe, so abort and hope for the best. Anyway there are various opinions to be had on this.
So I would say in Flow keep it simple: Add a couple of macros to use if desired:
I figure that decisions as to what one might want to do to conditionally abort() or not, depending on ??? – that can be left to the individual project. After all they can have their own 2 macros named (whatever) that would, e.g.:
Then you can have each project follow whatever policy makes sense for them.
To be clear – FLOW_LOG_FATAL() continues to be available and won't abort anything. So one can log a number of FATAL messages and then do whatever they feel is right manually.
The text was updated successfully, but these errors were encountered: