IndexLoggingasmjit::Logger

asmjit::Logger Class Reference [¶]

Inheritance diagram for asmjit::Logger:
asmjit::FileLogger asmjit::StringLogger

Logging interface.

This class can be inherited and reimplemented to fit into your own logging needs. When reimplementing a logger use Logger::_log() method to log customize the output.

There are two Logger implementations offered by AsmJit:

Public Members

Member Functions

Construction & Destruction

Format Options

Logging Interface

Logger::Logger()noexcept[¶]

Creates a Logger instance.

Logger::~Logger()virtualnoexcept[¶]

Destroys the Logger instance.

FormatOptions& Logger::options()nodiscardnoexcept[1/2][¶]

Returns FormatOptions of this logger.

const FormatOptions& Logger::options() constnodiscardnoexcept[2/2][¶]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void Logger::set_options(
const FormatOptions& options
)noexcept[¶]

Sets formatting options of this Logger to options.

void Logger::reset_options()noexcept[¶]

Resets formatting options of this Logger to defaults.

FormatFlags Logger::flags() constnodiscardnoexcept[¶]

Returns formatting flags.

bool Logger::has_flag() constnodiscardnoexcept[¶]

Tests whether the logger has the given flag enabled.

void Logger::set_flags()noexcept[¶]

Sets formatting flags to flags.

void Logger::add_flags()noexcept[¶]

Enables the given formatting flags.

void Logger::clear_flags()noexcept[¶]

Disables the given formatting flags.

uint32_t Logger::indentation() constnodiscardnoexcept[¶]

Returns indentation of a given indentation group.

void Logger::set_indentation(
uint32_t n
)noexcept[¶]

Sets indentation of the given indentation group to n spaces.

void Logger::reset_indentation()noexcept[¶]

Resets indentation of the given indentation group to 0 spaces.

size_t Logger::padding() constnodiscardnoexcept[¶]

Returns padding of a given padding group.

void Logger::set_padding(
uint32_t n
)noexcept[¶]

Sets padding of a given padding group to n.

void Logger::reset_padding()noexcept[¶]

Resets padding of a given padding group to 0, which means that a default will be used.

Error Logger::_log(
const char* data,
size_t size
)virtualnoexcept[¶]

Logs str - must be reimplemented.

The function can accept either a null terminated string if size is SIZE_MAX or a non-null terminated string of the given size. The function cannot assume that the data is null terminated and must handle non-null terminated inputs.

Reimplemented in asmjit::FileLogger, and asmjit::StringLogger.

Error Logger::log(
const char* data,
size_t size = SIZE_MAX
)noexcept[1/2][¶]

Logs string str, which is either null terminated or having size size.

Error Logger::log(
const String& str
)noexcept[2/2][¶]

Logs content of a string str.

Error Logger::logf(
const char* fmt,
...
)noexcept[¶]

Formats the message by using snprintf() and then passes the formatted string to _log().

Error Logger::logv(
const char* fmt,
va_list ap
)noexcept[¶]

Formats the message by using vsnprintf() and then passes the formatted string to _log().

FormatOptions Logger::_options[¶]

Format options.