Table of Contents

Class Logger

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

User-defined info logger for RocksDb. Override Log(InfoLogLevel, string) to receive log messages from the database engine.

public abstract class Logger : RocksDbHandle, IDisposable
Inheritance
Logger
Implements
Inherited Members

Constructors

Logger(InfoLogLevel)

Creates a logger that asks RocksDb for messages at or above a level.

protected Logger(InfoLogLevel logLevel)

Parameters

logLevel InfoLogLevel

The lowest level this logger wants.

Remarks

A request rather than a guarantee. RocksDb logs a great deal through a call that carries no level, and those messages arrive tagged Info whatever was asked for: measured over a database open, write and flush, a logger constructed at Warn received 354 of them. Only the calls that do carry a level are filtered. A logger that must not see the rest has to check logLevel in its own Log(InfoLogLevel, string).

Methods

DisposeHandle()

Releases the native handle. Called during disposal.

protected override void DisposeHandle()

Remarks

Protected rather than public: it destroys the native object without marking this instance disposed or clearing the handle, so calling it from outside and then disposing normally would free the same pointer twice. It was the most Dispose-looking member on the type. Callers want Dispose().

DisposeUnmanagedResources()

Releases unmanaged resources used by the current instance.

protected override void DisposeUnmanagedResources()

Remarks

Protected for the same reason as DisposeHandle().

Log(InfoLogLevel, string)

Called by RocksDb to log a message at the specified level.

public abstract void Log(InfoLogLevel logLevel, string message)

Parameters

logLevel InfoLogLevel

The severity level of the message.

message string

The log message text.