@@ -193,15 +193,15 @@ public PsesLogger Build()
193
193
{
194
194
configuration = configuration . WriteTo . Console (
195
195
restrictedToMinimumLevel : ConvertLogLevel ( _consoleLogLevel ?? _logLevel ) ,
196
- outputTemplate : "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Message}{Newline}{Exception}" ) ;
196
+ outputTemplate : "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Message}{Newline}{Exception}{Newline} " ) ;
197
197
}
198
198
199
199
foreach ( KeyValuePair < string , FileLogConfiguration > logFile in _filePaths )
200
200
{
201
201
configuration = configuration . WriteTo . Async ( a => a . File ( logFile . Key ,
202
202
restrictedToMinimumLevel : ConvertLogLevel ( logFile . Value . logLevel ?? _logLevel ) ,
203
203
shared : logFile . Value . useMultiprocess ,
204
- outputTemplate : "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Message}{Newline}{Exception}" )
204
+ outputTemplate : "{Timestamp:yyyy-MM-dd HH:mm:ss.fff} {Message}{Newline}{Exception}{Newline} " )
205
205
) ;
206
206
}
207
207
@@ -314,19 +314,19 @@ public void Write(
314
314
/// Log an exception in the logs.
315
315
/// </summary>
316
316
/// <param name="errorMessage">The error message of the exception to be logged.</param>
317
- /// <param name="errorException ">The exception itself that has been thrown.</param>
317
+ /// <param name="exception ">The exception itself that has been thrown.</param>
318
318
/// <param name="callerName">The name of the method in which the logger is being called.</param>
319
319
/// <param name="callerSourceFile">The name of the source file in which the logger is being called.</param>
320
320
/// <param name="callerLineNumber">The line number in the file where the logger is being called.</param>
321
321
public void WriteException (
322
322
string errorMessage ,
323
- Exception errorException ,
323
+ Exception exception ,
324
324
[ CallerMemberName ] string callerName = null ,
325
325
[ CallerFilePath ] string callerSourceFile = null ,
326
326
[ CallerLineNumber ] int callerLineNumber = 0 )
327
327
{
328
- _logger . Error ( "[{Error:l}] {CallerSourceFile:l}: In '{CallerName:l}', line {CallerLineNumber}:\n Exception: {ErrorMessage:l}\n {ErrorException} " ,
329
- LogLevel . Error . ToString ( ) . ToUpper ( ) , callerSourceFile , callerName , callerLineNumber , errorMessage , errorException ) ;
328
+ _logger . Error ( "[{Error:l}] {CallerSourceFile:l}: In '{CallerName:l}', line {CallerLineNumber}:\n {ErrorMessage:l}\n {Exception:l} \n " ,
329
+ LogLevel . Error . ToString ( ) . ToUpper ( ) , callerSourceFile , callerName , callerLineNumber , errorMessage , exception ) ;
330
330
}
331
331
332
332
/// <summary>
@@ -343,7 +343,7 @@ private static string IndentMsg(string logMessage)
343
343
msgLines [ i ] = msgLines [ i ] . Insert ( 0 , " " ) ;
344
344
}
345
345
346
- return String . Join ( "\n " , msgLines ) ;
346
+ return String . Join ( "\n " , msgLines ) + " \n " ;
347
347
}
348
348
349
349
#region IDisposable Support
0 commit comments