aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Logging/ILogger.cs
blob: 61108962aec6d525d131c4348fe4e39baa975385 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.Logging
{
    /// <summary>
    /// Represents a logging mechanism capable of being registered as a logger on the library <see cref="LogManager"/>.
    /// </summary>
    public interface ILogger
    {
        /// <summary>
        /// Called when a new library trace is available.
        /// </summary>
        /// <param name="output">The output.</param>
        void OnTrace(LogItemBase output);

        /// <summary>
        /// Called when a new library exception is available.
        /// </summary>
        /// <param name="output">The output.</param>
        void OnError(LogItemBase output);

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ILogger"/> is enabled.
        /// </summary>
        bool Enabled { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ILogger"/> will be notified about logs without waiting for the logs queue.
        /// </summary>
        bool Immediate { get; set; }
    }
}