@@ -54,7 +54,7 @@ public static Logger Instance
54
54
/// <param name="ex">The ex.</param>
55
55
/// <param name="exceptionString">The exception string.</param>
56
56
/// <returns></returns>
57
- private static string GetFormattedMessageFromExceptipon ( Exception ex , string exceptionString )
57
+ private static string GeDetailFromExceptipon ( Exception ex , string exceptionString )
58
58
{
59
59
var mesgAndStackTrace = string . Format ( ExceptionMessageWithoutInnerException , Environment . NewLine ,
60
60
exceptionString , Environment . NewLine , ex . Message , Environment . NewLine , ex . StackTrace ) ;
@@ -63,7 +63,7 @@ private static string GetFormattedMessageFromExceptipon(Exception ex, string exc
63
63
{
64
64
mesgAndStackTrace = string . Format ( ExceptionMessageWithInnerException , mesgAndStackTrace ,
65
65
Environment . NewLine ,
66
- GetFormattedMessageFromExceptipon ( ex . InnerException , InnerExceptionName ) ) ;
66
+ GeDetailFromExceptipon ( ex . InnerException , InnerExceptionName ) ) ;
67
67
}
68
68
69
69
return mesgAndStackTrace + Environment . NewLine ;
@@ -74,7 +74,7 @@ private static string GetFormattedMessageFromExceptipon(Exception ex, string exc
74
74
#region Public Methods
75
75
76
76
/// <summary>
77
- /// The debug information .
77
+ /// Log a message object with the log4net.Core.Level.Debug level .
78
78
/// </summary>
79
79
/// <param name="message">The message.</param>
80
80
public void Debug ( object message )
@@ -83,7 +83,25 @@ public void Debug(object message)
83
83
}
84
84
85
85
/// <summary>
86
- /// The error message.
86
+ /// Logs a message object with the log4net.Core.Level.Info level.
87
+ /// </summary>
88
+ /// <param name="message">The message.</param>
89
+ public void Info ( object message )
90
+ {
91
+ LoggerObject . Info ( message ) ;
92
+ }
93
+
94
+ /// <summary>
95
+ /// Logs a message object with the log4net.Core.Level.Info Warning.
96
+ /// </summary>
97
+ /// <param name="message">The message.</param>
98
+ public void Warning ( object message )
99
+ {
100
+ LoggerObject . Warn ( message ) ;
101
+ }
102
+
103
+ /// <summary>
104
+ /// Logs a message object with the log4net.Core.Level.Error level.
87
105
/// </summary>
88
106
/// <param name="message">The message.</param>
89
107
public void Error ( string message )
@@ -92,16 +110,16 @@ public void Error(string message)
92
110
}
93
111
94
112
/// <summary>
95
- /// Errors the specified ex .
113
+ /// Log a exception with the log4net.Core.Level.Fatal level .
96
114
/// </summary>
97
115
/// <param name="ex">The ex.</param>
98
116
public void Error ( Exception ex )
99
117
{
100
- LoggerObject . Error ( GetFormattedMessageFromExceptipon ( ex , ExceptionName ) ) ;
118
+ LoggerObject . Error ( GeDetailFromExceptipon ( ex , ExceptionName ) ) ;
101
119
}
102
120
103
121
/// <summary>
104
- /// The error message.
122
+ /// Log a message object with the log4net.Core.Level.Error level including the
105
123
/// </summary>
106
124
/// <param name="message">The message.</param>
107
125
/// <param name="exception">The exception.</param>
@@ -111,23 +129,33 @@ public void Error(object message, Exception exception)
111
129
}
112
130
113
131
/// <summary>
114
- /// The information method .
132
+ /// Log a message object with the log4net.Core.Level.Fatal level .
115
133
/// </summary>
116
134
/// <param name="message">The message.</param>
117
- public void Info ( object message )
135
+ public void Fatal ( string message )
118
136
{
119
- LoggerObject . Info ( message ) ;
137
+ LoggerObject . Fatal ( message ) ;
120
138
}
121
139
122
140
/// <summary>
123
- /// The Warning method .
141
+ /// Log a exception with the log4net.Core.Level.Fatal level .
124
142
/// </summary>
125
- /// <param name="message ">The message .</param>
126
- public void Warning ( object message )
143
+ /// <param name="ex ">The ex .</param>
144
+ public void Fatal ( Exception ex )
127
145
{
128
- LoggerObject . Warn ( message ) ;
146
+ LoggerObject . Fatal ( GeDetailFromExceptipon ( ex , ExceptionName ) ) ;
129
147
}
130
148
149
+ /// <summary>
150
+ /// Log a message object with the log4net.Core.Level.Fatal level including the
151
+ // stack trace of the System.Exception passed as a parameter.
152
+ /// </summary>
153
+ /// <param name="message">The message.</param>
154
+ /// <param name="exception">The exception.</param>
155
+ public void Fatal ( object message , Exception exception )
156
+ {
157
+ LoggerObject . Fatal ( message , exception ) ;
158
+ }
131
159
#endregion
132
160
}
133
161
}
0 commit comments