You are here: Tuning > Diagnostics

Diagnostics

The db4o engine provides user with a special mechanism showing runtime diagnostics information. Diagnostics can be switched on in the configuration before opening the database file:

The DiagnosticListener is a callback interface tracking diagnostic messages from different parts of the system.

IEmbeddedConfiguration configuration = Db4oEmbedded.NewConfiguration();
configuration.Common.Diagnostic.AddListener(new DiagnosticToConsole());
CommonConfigurationExamples.cs: Add a diagnostic listener
Dim configuration As IEmbeddedConfiguration = Db4oEmbedded.NewConfiguration()
configuration.Common.Diagnostic.AddListener(New DiagnosticToConsole())
CommonConfigurationExamples.vb: Add a diagnostic listener

Built-in Listeners

There are two build in listeners, which print the output to the console

Messages-Types

Every diagnostic message is represented by it's own type. You can filter the messages by checking for certain instances. Take a look how you can filter for certain messages.