public void LogSettings() { log.Info(Program.MaskFilePath(ConfigFile)); log.Info("OUTLOOK SETTINGS:-"); log.Info(" Service: " + OutlookService.ToString()); if (OutlookService == OutlookOgcs.Calendar.Service.SharedCalendar) { log.Info(" Shared Calendar: " + SharedCalendar); } else { log.Info(" Mailbox/FolderStore Name: " + MailboxName); } log.Info(" Calendar: " + (UseOutlookCalendar.Name == "Calendar"?"Default ":"") + UseOutlookCalendar.ToString()); log.Info(" Category Filter: " + CategoriesRestrictBy.ToString()); log.Info(" Categories: " + String.Join(",", Categories.ToArray())); log.Info(" Only Responded Invites: " + OnlyRespondedInvites); log.Info(" Filter String: " + OutlookDateFormat); log.Info(" GAL Blocked: " + OutlookGalBlocked); if (TimezoneMaps.Count > 0) { log.Info(" Custom Timezone Mapping:-"); TimezoneMaps.ToList().ForEach(tz => log.Info(" " + tz.Key + " => " + tz.Value)); } log.Info("GOOGLE SETTINGS:-"); log.Info(" Calendar: " + (UseGoogleCalendar == null ? "" : UseGoogleCalendar.ToString(true))); log.Info(" Exclude Goals: " + ExcludeGoals); log.Info(" Personal API Keys: " + UsingPersonalAPIkeys()); log.Info(" Client Identifier: " + PersonalClientIdentifier); log.Info(" Client Secret: " + (PersonalClientSecret.Length < 5 ? "".PadLeft(PersonalClientSecret.Length, '*') : PersonalClientSecret.Substring(0, PersonalClientSecret.Length - 5).PadRight(5, '*'))); log.Info(" API attendee limit in effect: " + APIlimit_inEffect); log.Info(" API attendee limit last reached: " + APIlimit_lastHit); log.Info(" Assigned API key: " + AssignedClientIdentifier); log.Info(" Cloak Email: " + CloakEmail); log.Info("SYNC OPTIONS:-"); log.Info(" How"); log.Info(" SyncDirection: " + SyncDirection.Name); log.Info(" MergeItems: " + MergeItems); log.Info(" DisableDelete: " + DisableDelete); log.Info(" ConfirmOnDelete: " + ConfirmOnDelete); log.Info(" SetEntriesPrivate: " + SetEntriesPrivate); log.Info(" SetEntriesAvailable: " + SetEntriesAvailable + (SetEntriesAvailable ? "; " + AvailabilityStatus : "")); log.Info(" SetEntriesColour: " + SetEntriesColour + (SetEntriesColour ? "; " + SetEntriesColourValue + "; \"" + SetEntriesColourName + "\"" : "")); if ((SetEntriesPrivate || SetEntriesAvailable || SetEntriesColour) && SyncDirection == Sync.Direction.Bidirectional) { log.Info(" TargetCalendar: " + TargetCalendar.Name); log.Info(" CreatedItemsOnly: " + CreatedItemsOnly); } if (ColourMaps.Count > 0) { log.Info(" Custom Colour/Category Mapping:-"); if (OutlookOgcs.Factory.OutlookVersionName == OutlookOgcs.Factory.OutlookVersionNames.Outlook2003) { log.Fail(" Using Outlook2003 - categories not supported, although mapping exists"); } else { ColourMaps.ToList().ForEach(c => log.Info(" " + OutlookOgcs.Calendar.Categories.OutlookColour(c.Key) + ":" + c.Key + " <=> " + c.Value + ":" + GoogleOgcs.EventColour.Palette.GetColourName(c.Value))); } } log.Info(" Obfuscate Words: " + Obfuscation.Enabled); if (Obfuscation.Enabled) { if (Settings.Instance.Obfuscation.FindReplace.Count == 0) { log.Info(" No regex defined."); } else { foreach (FindReplace findReplace in Settings.Instance.Obfuscation.FindReplace) { log.Info(" '" + findReplace.find + "' -> '" + findReplace.replace + "'"); } } } log.Info(" When"); log.Info(" DaysInThePast: " + DaysInThePast); log.Info(" DaysInTheFuture:" + DaysInTheFuture); log.Info(" SyncInterval: " + SyncInterval); log.Info(" SyncIntervalUnit: " + SyncIntervalUnit); log.Info(" Push Changes: " + OutlookPush); log.Info(" What"); log.Info(" AddLocation: " + AddLocation); log.Info(" AddDescription: " + AddDescription + "; OnlyToGoogle: " + AddDescription_OnlyToGoogle); log.Info(" AddAttendees: " + AddAttendees); log.Info(" AddColours: " + AddColours); log.Info(" AddReminders: " + AddReminders); log.Info(" UseGoogleDefaultReminder: " + UseGoogleDefaultReminder); log.Info(" UseOutlookDefaultReminder: " + UseOutlookDefaultReminder); log.Info(" ReminderDND: " + ReminderDND + " (" + ReminderDNDstart.ToString("HH:mm") + "-" + ReminderDNDend.ToString("HH:mm") + ")"); log.Info("PROXY:-"); log.Info(" Type: " + Proxy.Type); if (Proxy.BrowserUserAgent != Proxy.DefaultBrowserAgent) { log.Info(" Browser Agent: " + Proxy.BrowserUserAgent); } if (Proxy.Type == "Custom") { log.Info(" Server Name: " + Proxy.ServerName); log.Info(" Port: " + Proxy.Port.ToString()); log.Info(" Authentication Required: " + Proxy.AuthenticationRequired); log.Info(" UserName: "******" Password: "******"" : "*********")); } log.Info("APPLICATION BEHAVIOUR:-"); log.Info(" ShowBubbleTooltipWhenSyncing: " + ShowBubbleTooltipWhenSyncing); log.Info(" StartOnStartup: " + StartOnStartup + "; DelayedStartup: " + StartupDelay.ToString()); log.Info(" HideSplashScreen: " + (UserIsBenefactor() ? HideSplashScreen.ToString() : "N/A")); log.Info(" SuppressSocialPopup: " + (UserIsBenefactor() ? SuppressSocialPopup.ToString() : "N/A")); log.Info(" StartInTray: " + StartInTray); log.Info(" MinimiseToTray: " + MinimiseToTray); log.Info(" MinimiseNotClose: " + MinimiseNotClose); log.Info(" ShowBubbleWhenMinimising: " + ShowBubbleWhenMinimising); log.Info(" Portable: " + Portable); log.Info(" CreateCSVFiles: " + CreateCSVFiles); log.Info(" VerboseOutput: " + VerboseOutput); log.Info(" MuteClickSounds: " + MuteClickSounds); //To pick up from settings.xml file: //((log4net.Repository.Hierarchy.Hierarchy)log.Logger.Repository).Root.Level.Name); log.Info(" Logging Level: " + LoggingLevel); log.Info(" Error Reporting: " + CloudLogging ?? "Undefined"); log.Info("ABOUT:-"); log.Info(" Alpha Releases: " + alphaReleases); log.Info(" Skip Version: " + SkipVersion); log.Info(" Subscribed: " + Subscribed.ToString("dd-MMM-yyyy")); log.Info(" Timezone Database: " + TimezoneDB.Instance.Version); log.Info("ENVIRONMENT:-"); log.Info(" Current Locale: " + System.Globalization.CultureInfo.CurrentCulture.Name); log.Info(" Short Date Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern); log.Info(" Short Time Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern); TimeZone curTimeZone = TimeZone.CurrentTimeZone; log.Info(" System Time Zone: " + curTimeZone.StandardName + "; DST=" + curTimeZone.IsDaylightSavingTime(DateTime.Now)); log.Info(" Completed Syncs: " + CompletedSyncs); }
public void LogSettings() { log.Info(Program.SettingsFile); log.Info("OUTLOOK SETTINGS:-"); log.Info(" Service: " + OutlookService.ToString()); if (OutlookService == OutlookOgcs.Calendar.Service.SharedCalendar) { log.Info(" Shared Calendar: " + SharedCalendar); } else { log.Info(" Mailbox/FolderStore Name: " + MailboxName); } log.Info(" Calendar: " + (UseOutlookCalendar.Name == "Calendar"?"Default ":"") + UseOutlookCalendar.Name); log.Info(" Category Filter: " + CategoriesRestrictBy.ToString()); log.Info(" Categories: " + String.Join(",", Categories.ToArray())); log.Info(" Filter String: " + OutlookDateFormat); log.Info(" GAL Blocked: " + OutlookGalBlocked); log.Info("GOOGLE SETTINGS:-"); log.Info(" Calendar: " + UseGoogleCalendar.Name); log.Info(" Personal API Keys: " + UsingPersonalAPIkeys()); log.Info(" Client Identifier: " + PersonalClientIdentifier); log.Info(" Client Secret: " + (PersonalClientSecret.Length < 5 ? "".PadLeft(PersonalClientSecret.Length, '*') : PersonalClientSecret.Substring(0, PersonalClientSecret.Length - 5).PadRight(5, '*'))); log.Info(" API attendee limit in effect: " + APIlimit_inEffect); log.Info(" API attendee limit last reached: " + APIlimit_lastHit); log.Info(" Assigned API key: " + AssignedClientIdentifier); log.Info(" Cloak Email: " + CloakEmail); log.Info("SYNC OPTIONS:-"); log.Info(" Main"); log.Info(" SyncDirection: " + SyncDirection.Name); log.Info(" DaysInThePast: " + DaysInThePast); log.Info(" DaysInTheFuture:" + DaysInTheFuture); log.Info(" SyncInterval: " + SyncInterval); log.Info(" SyncIntervalUnit: " + SyncIntervalUnit); log.Info(" Push Changes: " + OutlookPush); log.Info(" AddDescription: " + AddDescription + "; OnlyToGoogle: " + AddDescription_OnlyToGoogle); log.Info(" AddReminders: " + AddReminders); log.Info(" UseGoogleDefaultReminder: " + UseGoogleDefaultReminder); log.Info(" ReminderDND: " + ReminderDND + " (" + ReminderDNDstart.ToString("HH:mm") + "-" + ReminderDNDend.ToString("HH:mm") + ")"); log.Info(" AddAttendees: " + AddAttendees); log.Info(" MergeItems: " + MergeItems); log.Info(" DisableDelete: " + DisableDelete); log.Info(" ConfirmOnDelete: " + ConfirmOnDelete); log.Info(" SetEntriesPrivate: " + SetEntriesPrivate); log.Info(" SetEntriesAvailable: " + SetEntriesAvailable); if ((SetEntriesPrivate || SetEntriesAvailable) && SyncDirection == SyncDirection.Bidirectional) { log.Info(" TargetCalendar: " + TargetCalendar.Name); log.Info(" CreatedItemsOnly: " + CreatedItemsOnly); } log.Info(" Obfuscate Words: " + Obfuscation.Enabled); if (Obfuscation.Enabled) { if (Settings.Instance.Obfuscation.FindReplace.Count == 0) { log.Info(" No regex defined."); } else { foreach (FindReplace findReplace in Settings.Instance.Obfuscation.FindReplace) { log.Info(" '" + findReplace.find + "' -> '" + findReplace.replace + "'"); } } } log.Info("PROXY:-"); log.Info(" Type: " + Proxy.Type); if (Proxy.Type == "Custom") { log.Info(" Server Name: " + Proxy.ServerName); log.Info(" Port: " + Proxy.Port.ToString()); log.Info(" Authentication Required: " + Proxy.AuthenticationRequired); log.Info(" UserName: "******" Password: "******"" : "*********")); } log.Info("APPLICATION BEHAVIOUR:-"); log.Info(" ShowBubbleTooltipWhenSyncing: " + ShowBubbleTooltipWhenSyncing); log.Info(" StartOnStartup: " + StartOnStartup + "; DelayedStartup: " + StartupDelay.ToString()); log.Info(" HideSplashScreen: " + ((Subscribed != DateTime.Parse("01-Jan-2000") || Donor) ? HideSplashScreen.ToString() : "N/A")); log.Info(" StartInTray: " + StartInTray); log.Info(" MinimiseToTray: " + MinimiseToTray); log.Info(" MinimiseNotClose: " + MinimiseNotClose); log.Info(" ShowBubbleWhenMinimising: " + ShowBubbleWhenMinimising); log.Info(" Portable: " + Portable); log.Info(" CreateCSVFiles: " + CreateCSVFiles); log.Info(" VerboseOutput: " + VerboseOutput); log.Info(" MuteClickSounds: " + MuteClickSounds); //To pick up from settings.xml file: //((log4net.Repository.Hierarchy.Hierarchy)log.Logger.Repository).Root.Level.Name); log.Info(" Logging Level: " + LoggingLevel); log.Info("ABOUT:-"); log.Info(" Alpha Releases: " + alphaReleases); log.Info(" Subscribed: " + Subscribed.ToString("dd-MMM-yyyy")); log.Info(" Timezone Database: " + TimezoneDB.Instance.Version); log.Info("ENVIRONMENT:-"); log.Info(" Current Locale: " + System.Globalization.CultureInfo.CurrentCulture.Name); log.Info(" Short Date Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern); log.Info(" Short Time Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern); log.Info(" Completed Syncs: " + CompletedSyncs); }
public void LogSettings() { log.Info(Program.MaskFilePath(ConfigFile)); log.Info("OUTLOOK SETTINGS:-"); log.Info(" Disconnect Between Sync: " + DisconnectOutlookBetweenSync); if (TimezoneMaps.Count > 0) { log.Info(" Custom Timezone Mapping:-"); TimezoneMaps.ToList().ForEach(tz => log.Info(" " + tz.Key + " => " + tz.Value)); } log.Info("GOOGLE SETTINGS:-"); log.Info(" Personal API Keys: " + UsingPersonalAPIkeys()); log.Info(" Client Identifier: " + PersonalClientIdentifier); log.Info(" Client Secret: " + (PersonalClientSecret.Length < 5 ? "".PadLeft(PersonalClientSecret.Length, '*') : PersonalClientSecret.Substring(0, PersonalClientSecret.Length - 5).PadRight(5, '*'))); log.Info(" API attendee limit in effect: " + APIlimit_inEffect); log.Info(" API attendee limit last reached: " + APIlimit_lastHit); log.Info(" Assigned API key: " + AssignedClientIdentifier); log.Info("PROXY:-"); log.Info(" Type: " + Proxy.Type); if (Proxy.BrowserUserAgent != Proxy.DefaultBrowserAgent) { log.Info(" Browser Agent: " + Proxy.BrowserUserAgent); } if (Proxy.Type == "Custom") { log.Info(" Server Name: " + Proxy.ServerName); log.Info(" Port: " + Proxy.Port.ToString()); log.Info(" Authentication Required: " + Proxy.AuthenticationRequired); log.Info(" UserName: "******" Password: "******"" : "*********")); } log.Info("APPLICATION BEHAVIOUR:-"); log.Info(" ShowBubbleTooltipWhenSyncing: " + ShowBubbleTooltipWhenSyncing); log.Info(" StartOnStartup: " + StartOnStartup + "; DelayedStartup: " + StartupDelay.ToString()); log.Info(" HideSplashScreen: " + (UserIsBenefactor() ? HideSplashScreen.ToString() : "N/A")); log.Info(" SuppressSocialPopup: " + (UserIsBenefactor() ? SuppressSocialPopup.ToString() : "N/A")); log.Info(" StartInTray: " + StartInTray); log.Info(" MinimiseToTray: " + MinimiseToTray); log.Info(" MinimiseNotClose: " + MinimiseNotClose); log.Info(" ShowBubbleWhenMinimising: " + ShowBubbleWhenMinimising); log.Info(" Portable: " + Portable); log.Info(" CreateCSVFiles: " + CreateCSVFiles); log.Info(" VerboseOutput: " + VerboseOutput); log.Info(" MuteClickSounds: " + MuteClickSounds); //To pick up from settings.xml file: //((log4net.Repository.Hierarchy.Hierarchy)log.Logger.Repository).Root.Level.Name); log.Info(" Logging Level: " + LoggingLevel); log.Info(" Error Reporting: " + CloudLogging ?? "Undefined"); log.Info("ABOUT:-"); log.Info(" Alpha Releases: " + alphaReleases); log.Info(" Skip Version: " + SkipVersion); log.Info(" Subscribed: " + Subscribed.ToString("dd-MMM-yyyy")); log.Info(" Timezone Database: " + TimezoneDB.Instance.Version); log.Info("ENVIRONMENT:-"); log.Info(" Current Locale: " + System.Globalization.CultureInfo.CurrentCulture.Name); log.Info(" Short Date Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern); log.Info(" Short Time Format: " + System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern); TimeZone curTimeZone = TimeZone.CurrentTimeZone; log.Info(" System Time Zone: " + curTimeZone.StandardName + "; DST=" + curTimeZone.IsDaylightSavingTime(DateTime.Now)); log.Info(" Completed Syncs: " + CompletedSyncs); }