GATE
C/C++ Framework
Loading...
Searching...
No Matches
LogProvider Class Reference

Log provider class. More...

#include <logging.hpp>

Public Member Functions

result_t log (enumint_t logType, result_t resultCode, int32_t nativeCode, String const &origin, String const &message)
 Write a new entry into the log with current timestamp and caller's process/thread info.
bool_t isEnabled (enumint_t logType) const
 Returns true if the log category type is enabled and will be handled.
gate_logger_t const * c_impl () const noexcept
 Returns native C logger implementation object.

Static Public Attributes

static enumint_t const Type_Debug = GATE_LOG_TYPE_DEBUG
 Debug log.
static enumint_t const Type_Info = GATE_LOG_TYPE_INFO
 Internal progress information.
static enumint_t const Type_Status = GATE_LOG_TYPE_STATUS
 Status change information.
static enumint_t const Type_Warning = GATE_LOG_TYPE_WARN
 Incorrect but non-critical failures.
static enumint_t const Type_Error = GATE_LOG_TYPE_ERROR
 Critical problem which aborts the current operation.
static enumint_t const Type_Fatal = GATE_LOG_TYPE_FATAL
 Critical problem which aborts current and other operations.

Detailed Description

Log provider class.

Member Function Documentation

◆ log()

result_t log ( enumint_t logType,
result_t resultCode,
int32_t nativeCode,
String const & origin,
String const & message )

Write a new entry into the log with current timestamp and caller's process/thread info.

Parameters
[in]logTypeLogging category
[in]resultCodeResult code associated with log entry
[in]nativeCodeNative status code associated with log entry
[in]originOriginating module name generating the log entry
[in]messageDescriptive information about the log entry and its reason
Returns
GATE_RESULT_* result code indicating success or failure of persisting the log record

◆ isEnabled()

bool_t isEnabled ( enumint_t logType) const

Returns true if the log category type is enabled and will be handled.

Parameters
[in]logTypeLogging category to be queried
Returns
true if log category is handled, false if log entries of this category will be discarded/skipped/deleted

◆ c_impl()

gate_logger_t const * c_impl ( ) const
noexcept

Returns native C logger implementation object.

Returns
Pointer to internal logger implementation object

The documentation for this class was generated from the following files: