src/Foundation/Common/Gimela.Common.Logging/FileLog/FileLogger.cs
/// <summary>
/// Writes the specified level logs.
/// </summary>
/// <param name="level">The level.</param>
/// <param name="exception">Thrown exception to log.</param>
Writes the specified level logs.
Writes the specified level logs .
private void Write(LogLevel level, Exception exception)
    {
      string msg = string.Empty;
      if (exception != null)
      {
        if (exception.StackTrace != null)
        {
          msg = string.Format(CultureInfo.InvariantCulture, @"{0}{1}{2}{3}", 
              exception.Message.ToString(), Environment.NewLine,
              exception.StackTrace.ToString(), Environment.NewLine);
        }
        else
        {
          msg = string.Format(CultureInfo.InvariantCulture, @"{0}{1}",
              exception.Message.ToString(), Environment.NewLine);
        }
      }
      Write(level, msg);
    }
private void Write ( LogLevel level , Exception exception ) { string msg = string . Empty ; if ( exception != null ) { if ( exception . StackTrace != null ) { msg = string . Format ( CultureInfo . InvariantCulture , @"{0}{1}{2}{3}" , exception . Message . ToString ( ) , Environment . NewLine , exception . StackTrace . ToString ( ) , Environment . NewLine ) ; } else { msg = string . Format ( CultureInfo . InvariantCulture , @"{0}{1}" , exception . Message . ToString ( ) , Environment . NewLine ) ; } } Write ( level , msg ) ; }
Writes the specified level logs.
Writes the specified level logs .
level
LogLevel
None
exception
Exception
Thrown exception to log.
Thrown exception to log .