VistaDB 6
VistaDB / Developer's Guide / Developer's Guide - Logging
In This Topic
    Developer's Guide - Logging
    In This Topic

    The VistaDB engine supports a diagnostic interface for recording health and performance information while it runs.  By implementing this interface your application can easily log these events for your review later.

    What Kind of Information is Available?

    Depending on the log level that is active a range of information is available including:

    Over time more information may be added to the logging data as it's found to be useful.

    Even if a database is encrypted the input queries and data returned can be logged unencrypted.  This is because logging happens near the client well above the encryption/decryption layer.  Since logging has to be set up at compile time in the process you can elect whether you want to enable logging in your encrypted application.

    How Do I Enable Logging?

    To record information you will need to either create your own implementation of the ILog Interface and register it with the Logging Class or use the Loupe Agent for VistaDB which implements this interface and routes the information into the Loupe Agent. 

    Multiple classes can be registered to receive messages.  All will be called when a new message is available.

    Does it Impact the Performance of VistaDB?

    It depends on the log level that is chosen.  The Normal level is designed to have no measurable performance impact and the Detailed level has minimal performance impact.  Both are suitable for continuous use in a deployed application.  The Debug level can have notable performance impact depending on the speed of the log system and the specific operations performed.

    To set the Log Level for the current process set the LoggingLevel Property.  This will apply to all connections in the current process.

    To prevent an error in a logging class from affecting the engine, any exception thrown by a logger will be caught by the engine and will not be logged (since logging it may cause an infinite loop). 

    See Also