OnixS C++ CME MDP Premium Market Data Handler 5.11.1
Users' manual and API documentation
Loading...
Searching...
No Matches
LogEntry Class Referenceabstract

#include <OnixS/CME/MDH/Logger.h>

Public Member Functions

virtual void category (LogCategory::Enum value)=0
virtual void source (const Messaging::StrRef &value)=0
virtual std::string & message ()=0
virtual void commit ()=0

Protected Member Functions

 LogEntry ()=default
virtual ~LogEntry ()=default

Detailed Description

Populate an entry returned by Logger::addEntry(), then call commit(). Clients must not delete entries directly or access an entry after committing it.

Definition at line 157 of file Logger.h.

Constructor & Destructor Documentation

◆ LogEntry()

LogEntry ( )
protecteddefault

Initializes an entry for use by a concrete logger implementation.

◆ ~LogEntry()

virtual ~LogEntry ( )
protectedvirtualdefault

Finalizes an entry whose lifetime is managed by its logger.

Member Function Documentation

◆ category()

virtual void category ( LogCategory::Enum value)
pure virtual

Sets the category of the entry.

Parameters
valueCategory describing the entry.
Exceptions
Anyexception propagated by the concrete logger implementation.

◆ commit()

virtual void commit ( )
pure virtual

Submits the entry to the logger and releases it.

The entry may cease to exist during this call. Do not access it after invoking this function.

Exceptions
Anyexception propagated by the concrete logger implementation.

◆ message()

virtual std::string & message ( )
pure virtual

Provides mutable access to the entry message.

Returns
Message buffer, valid until commit() is called.
Exceptions
Anyexception propagated by the concrete logger implementation.

◆ source()

virtual void source ( const Messaging::StrRef & value)
pure virtual

Sets the component or subsystem that produced the entry.

Parameters
valueSource identifier to assign to the entry.
Exceptions
Anyexception propagated by the concrete logger implementation.