StreamLink.NET
Logger Property
StreamLink.NETCaplin.StreamLinkStreamLinkLogger
Gets or sets the ILogger that all logging information will be sent to.
Declaration Syntax
C#Visual BasicVisual C++
public ILogger Logger { get; set; }
Public Property Logger As ILogger
public:
virtual property ILogger^ Logger {
	ILogger^ get () sealed;
	void set (ILogger^ value) sealed;
}
Value
The logger.
Remarks

If you want your application to log StreamLink errors and other activity, implement the ILogger interface. The application must register the ILogger with StreamLink by setting the Logger property of the StreamLink object. The application can then use this single logger to log both StreamLink library information and information originating from the application itself.

If you do not implement an ILogger, StreamLink will send any logging information it generates to the inbuilt FileLogger, provided this logger has been enabled in the StreamLink configuration file (see "Activating the StreamLink File Logger" in this document). If the FileLogger has not been enabled, StreamLink will send its logging information to the ConsoleLogger.

Examples
CopyC#
using System;
using System.Collections.Generic;
using System.Text;

using Caplin.StreamLink;
using Caplin.StreamLink.Logging;
using System.Diagnostics;
using Caplin.StreamLink.Authentication;

namespace StreamLinkExamples.Basics
{
    /// <summary>
    /// Example inner class that implements ILogger and
    /// a an outline of how it may be used.
    /// </summary>
    public class SettingUpALogger
    {
        /// <summary>
        /// Example of a class that implements ILogger and
        /// a an outline of how it may be used.
        /// </summary>
        public static void SettingUpALoggerExample()
        {
            IStreamLink myStreamLink = new StreamLink();

            // Set the logger property to start using the console logger
            myStreamLink.Logger = new ConsoleLogger();
        }
    }
}

Assembly: Caplin.StreamLink (Module: Caplin.StreamLink) Version: 5.0.19.0 (5.0.19.0)