blob: d0f5949a25228c28be8abb6aa1fa8553205ecaf3 (
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ILog.cs" company="HandBrake Project (http://handbrake.fr)">
// This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
// </copyright>
// <summary>
// Defines the ILog type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrakeWPF.Services.Logging.Interfaces
{
using System;
using System.Collections.Generic;
using LogEventArgs = HandBrakeWPF.Services.Logging.EventArgs.LogEventArgs;
using LogLevel = HandBrakeWPF.Services.Logging.Model.LogLevel;
using LogMessage = HandBrakeWPF.Services.Logging.Model.LogMessage;
using LogMessageType = HandBrakeWPF.Services.Logging.Model.LogMessageType;
/// <summary>
/// The Log interface.
/// </summary>
public interface ILog
{
/// <summary>
/// The message logged.
/// </summary>
event EventHandler<LogEventArgs> MessageLogged;
/// <summary>
/// The log reset event
/// </summary>
event EventHandler LogReset;
/// <summary>
/// Gets the log messages.
/// </summary>
IEnumerable<LogMessage> LogMessages { get; }
/// <summary>
/// Gets the activity log.
/// </summary>
string ActivityLog { get; }
/// <summary>
/// The reset.
/// </summary>
void Reset();
/// <summary>
/// The enable.
/// </summary>
void Enable();
/// <summary>
/// Log a message.
/// </summary>
/// <param name="content">
/// The content of the log message,
/// </param>
/// <param name="type">
/// The Message Type. (i.e. where it came from)
/// </param>
/// <param name="level">
/// The log level
/// </param>
void LogMessage(string content, LogMessageType type, LogLevel level);
/// <summary>
/// Enable Logging to Disk
/// </summary>
/// <param name="logFile">
/// The log file to write to.
/// </param>
/// <param name="deleteCurrentLogFirst">
/// Delete the current log file if it exists.
/// </param>
void EnableLoggingToDisk(string logFile, bool deleteCurrentLogFirst);
/// <summary>
/// The setup log header.
/// </summary>
/// <param name="header">
/// The header.
/// </param>
void SetupLogHeader(string header);
}
}
|