Allows stream like sending of GelfMessage.
Usually used in conjunction with a convenience macro like GELF_MESSAGE to allow conditional sending.
Allows contextual-conversion to bool to check wether the output is valid. An output is valid if it can accept messages, meaning:
- output is a reference to an output type
- output is a non-null pointer to an output type
- output is a valid smart pointer (shared, unique) to an output type
- Note
- Send explicitly requires to provide the output again, since it is not stored inside the stream. This is due to the need to support arbitrary, non-virtual output types.
Usage example:
if (stream)
{
stream.Send(output) = message;
stream.Send(output) << message_1 << message_2;
}