asmjit::FileLogger Class Reference
Inheritance diagram for asmjit::FileLogger:
asmjit::Logger

Logger that can log to a FILE*.

Public Members

- Public Attributes inherited from asmjit::Logger

Member Functions

Construction & Destruction
Accessors
- Public Member Functions inherited from asmjit::Logger

Constructor & Destructor Documentation

FileLogger::FileLogger(FILE* file = nullptr)noexcept◆ 

Creates a new FileLogger that logs to FILE*.

FileLogger::~FileLogger()overridenoexcept◆ 

Destroys the FileLogger.

Member Function Documentation

FILE* FileLogger::file() constnoexcept◆ 

Returns the logging output stream or null if the logger has no output stream.

void FileLogger::setFile(FILE* file)noexcept◆ 

Sets the logging output stream to stream or null.

Note
If the file is null the logging will be disabled. When a logger is attached to CodeHolder or any emitter the logging API will always be called regardless of the output file. This means that if you really want to disable logging at emitter level you must not attach a logger to it.

Error FileLogger::_log(const char* data, size_t size = SIZE_MAX)overridenoexcept◆ 

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 from asmjit::Logger.