// Token: 0x06000EF5 RID: 3829 RVA: 0x00059578 File Offset: 0x00057778 private static void CatchAndLogStorageExceptions(PublicFolderAssistantLogger assistantLogger, PublicFolderItemProcessor.FolderRec folderRec, string context, Action actionDelegate) { Exception ex = null; try { actionDelegate(); } catch (StoragePermanentException ex2) { ex = ex2; } catch (StorageTransientException ex3) { ex = ex3; } if (ex != null) { assistantLogger.LogEvent(LogEventType.Error, string.Format(CultureInfo.InvariantCulture, "[ErrorContext:{0}.{1}] {2}", new object[] { context, folderRec.FolderId.ToHexEntryId(), PublicFolderMailboxLoggerBase.GetExceptionLogString(ex, PublicFolderMailboxLoggerBase.ExceptionLogOption.All) })); } }
// Token: 0x06000EDC RID: 3804 RVA: 0x00058766 File Offset: 0x00056966 public static void LogOnServer(Exception exception) { PublicFolderMailboxLoggerBase.LogOnServer(exception, "PublicFolderAssistantLog", "PublicFolderAssistantLog"); }
private bool ShouldSyncMailbox() { bool result; try { ExchangePrincipal exchangePrincipal; if (!PublicFolderSession.TryGetPublicFolderMailboxPrincipal(this.OrganizationId, this.ContentMailboxGuid, false, out exchangePrincipal) || exchangePrincipal == null) { PublicFolderSynchronizerLogger.LogOnServer(string.Format("Sync Cancelled for Mailbox {0} in Organization {1}. Could not get ExchangePrincipal. Mailbox could have been deleted.", this.ContentMailboxGuid, this.OrganizationId), LogEventType.Warning, null); result = false; } else if (!exchangePrincipal.MailboxInfo.IsRemote && LocalServerCache.LocalServer != null && exchangePrincipal.MailboxInfo.Location.ServerFqdn != LocalServerCache.LocalServer.Fqdn) { PublicFolderSynchronizerLogger.LogOnServer(string.Format("Sync Cancelled for Mailbox {0} in Organization {1}. Mailbox was moved to Server {2}.", this.ContentMailboxGuid, this.OrganizationId, exchangePrincipal.MailboxInfo.Location.ServerFqdn), LogEventType.Warning, null); result = false; } else { result = true; } } catch (LocalizedException e) { PublicFolderSynchronizerLogger.LogOnServer(string.Format("Sync Cancelled for Mailbox {0} in Organization {1}. Could not get ExchangePrincipal. Mailbox could have been deleted/relocated. Exception - {2}", this.ContentMailboxGuid, this.OrganizationId, PublicFolderMailboxLoggerBase.GetExceptionLogString(e, PublicFolderMailboxLoggerBase.ExceptionLogOption.All)), LogEventType.Warning, null); result = false; } return(result); }
public static void LogOnServer(string data, LogEventType eventType, Guid?transactionId = null) { PublicFolderMailboxLoggerBase.LogOnServer(data, eventType, "PublicFolderSyncLog", "PublicFolderSyncLog", transactionId); }