Defines a policy to apply when the Logger fails to process a Message, namely, forward it to GlobalLogger. More...
#include "keyvalue/sys/logger/policy/ForwardToGlobalLogger.h"
Protected Member Functions | |
bool | apply (const Logger *logger, const Message &message) const |
Applies ForwardToGlobalLogger policy. | |
Private Member Functions | |
void | forward (const Logger *logger, const Message &message) const |
Forwards a Message to GlobalLogger. |
Defines a policy to apply when the Logger fails to process a Message, namely, forward it to GlobalLogger.
If the GlobalLogger is the one that fails, it is very likely that it can no longer receive Messages. For that reason, this policy resets GlobalLogger to its default(which supposedly never fails) before the forwarding.
Applies ForwardToGlobalLogger policy.
false
to indicate the previous failure. Forwards a Message to GlobalLogger.
This method receives a (raw) pointer to the Logger that has failed. If this pointer points to GlobalLogger's current registered Logger, then this method resets the GlobalLogger to its default Logger (which supposedly never fails).