Programming with LEADTOOLS Logging
Creating Logging Channels
A Logging Channel is an object that listens for log messages and processes them. The Leadtools.Logging assembly provides several default implementations of logging channels. To create your own logging channel, you must create a class that implements ILoggingChannel. If you don't want to completely re-implement ILoggingChannel, then you can create a new class that derives from the LoggingChannel base class instead.
Logging Messages
Logging messages consists of sending log entries to the registered log channels. If you want log a specific log entry type you can call one of the Logger specific methods:
For more control over the log entry, you can use the Logger.Log method to send a LogEntry item. If you require custom information use the LogEntry.CustomInformation dictionary.
Logging DICOM Messages
If you want to log DICOM specific messages use Leadtools.Logging.Medical.LogExtensions. A MessageDirection type is provided to allow you to specify the direction of a communication message. In addition, the DicomLogEntry class is a custom ILogEntry implementation that has additional properties specific to DICOM logging.
Configuring AppConfig for Logging
To configure logging in your App.Config file you need to first add the configuration section.
After adding the configuration section you can begin by adding the logging section. The logging section has the following child elements.
channels | Global channels that are accessed with Logger.Global. |
loggers | Custom loggers are stored in this element. |
The element has the following child element.
channel | User specific logging channel. Multiple elements allowed. |
The element has the following attributes:
The element has the following child element:
logger | User defined logger. Multiple elements allowed. |
The element has the following attributes:
The element has the following child element:
channels | List of channels associated with the logger. |
Products |
Support |
Feedback: Programming with LEADTOOLS Logging |
Introduction |
Help Version 19.0.2017.6.21
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.