private void LogLibraryServiceError(Exception ex, string serviceUrl = null)
 {
     LogLibraryAlert?.Invoke(this, new LogLibraryEventArgs(ex) { ServiceUrl = serviceUrl ?? GetServiceUrl() });
     if (!string.IsNullOrEmpty(_config.LibraryLogFileName))
     {
         LogLibraryError(ex, _config.LibraryLogFileName);
     }
 }
Exemplo n.º 2
0
 private void LogLibraryServiceError(Exception ex, string serviceUrl = null)
 {
     LogLibraryAlert?.Invoke(this, new LogLibraryEventArgs(ex)
     {
         ServiceUrl = serviceUrl ?? GetServiceUrl()
     });
     try
     {
         AWSLoggerConfig.LogLibraryError(ex.Message + Environment.NewLine + "StackTrace: " + ex.StackTrace);
     }
     catch (Exception e)
     {
         Console.WriteLine("Exception caught when writing error log to file" + e.ToString());
     }
 }