Skip to content

Commit 2fd3895

Browse files
committed
Merged pull request #1 from timryan/master.
Logging Exceptions
2 parents a44ab02 + f75140a commit 2fd3895

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/ServiceStack.Logging.NLog/NLogLogger.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public void Debug(object message)
4242
/// <param name="exception">The exception.</param>
4343
public void Debug(object message, Exception exception)
4444
{
45-
log.Debug(message + " : " + exception.ToString());
45+
log.DebugException(message.ToString(), exception);
4646
}
4747

4848
/// <summary>
@@ -71,7 +71,7 @@ public void Error(object message)
7171
/// <param name="exception">The exception.</param>
7272
public void Error(object message, Exception exception)
7373
{
74-
log.Error(message + " : " + exception.ToString());
74+
log.ErrorException(message.ToString(), exception);
7575
}
7676

7777
/// <summary>
@@ -100,7 +100,7 @@ public void Fatal(object message)
100100
/// <param name="exception">The exception.</param>
101101
public void Fatal(object message, Exception exception)
102102
{
103-
log.Fatal(message + " : " + exception.ToString());
103+
log.FatalException(message.ToString(), exception);
104104
}
105105

106106
/// <summary>
@@ -129,7 +129,7 @@ public void Info(object message)
129129
/// <param name="exception">The exception.</param>
130130
public void Info(object message, Exception exception)
131131
{
132-
log.Info(message + " : " + exception.ToString());
132+
log.InfoException(message.ToString(), exception);
133133
}
134134

135135
/// <summary>
@@ -158,7 +158,7 @@ public void Warn(object message)
158158
/// <param name="exception">The exception.</param>
159159
public void Warn(object message, Exception exception)
160160
{
161-
log.Warn(message + " : " + exception.ToString());
161+
log.WarnException(message.ToString(), exception);
162162
}
163163

164164
/// <summary>

0 commit comments

Comments
 (0)