-
Notifications
You must be signed in to change notification settings - Fork 18
/
ILog.cs
103 lines (89 loc) · 3.8 KB
/
ILog.cs
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
namespace LoggingExtensions.Logging
{
using System;
/// <summary>
/// Custom interface for logging messages
/// </summary>
public interface ILog
{
/// <summary>
/// Initializes the instance for the logger name
/// </summary>
/// <param name="loggerName">Name of the logger</param>
void InitializeFor(string loggerName);
/// <summary>
/// Debug level of the specified message. The other method is preferred since the execution is deferred.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="formatting">The formatting.</param>
void Debug(string message, params object[] formatting);
/// <summary>
/// Debug level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
void Debug(Func<string> message);
/// <summary>
/// Info level of the specified message. The other method is preferred since the execution is deferred.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="formatting">The formatting.</param>
void Info(string message, params object[] formatting);
/// <summary>
/// Info level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
void Info(Func<string> message);
/// <summary>
/// Warn level of the specified message. The other method is preferred since the execution is deferred.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="formatting">The formatting.</param>
void Warn(string message, params object[] formatting);
/// <summary>
/// Warn level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
void Warn(Func<string> message);
/// <summary>
/// Error level of the specified message. The other method is preferred since the execution is deferred.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="formatting">The formatting.</param>
void Error(string message, params object[] formatting);
/// <summary>
/// Error level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
void Error(Func<string> message);
/// <summary>
/// Error level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="exception">The exception.</param>
void Error(Func<string> message,Exception exception);
/// <summary>
/// Fatal level of the specified message. The other method is preferred since the execution is deferred.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="formatting">The formatting.</param>
void Fatal(string message, params object[] formatting);
/// <summary>
/// Fatal level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
void Fatal(Func<string> message);
/// <summary>
/// Fatal level of the specified message.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="exception">The exception.</param>
void Fatal(Func<string> message, Exception exception);
}
/// <summary>
/// Ensures a default constructor for the logger type
/// </summary>
/// <typeparam name="T"></typeparam>
public interface ILog<T> //where T : new()
{
}
}