Created
September 20, 2012 12:50
-
-
Save chgeuer/3755701 to your computer and use it in GitHub Desktop.
Für Mario
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public override bool OnStart() | |
| { | |
| Trace.TraceInformation("OnStart() called"); | |
| MicrosoftCorpnetAuthenticationFixer.TweakIdentityWhenRunningInCorpnet(); | |
| TimeSpan scheduledTransferPeriod = TimeSpan.FromMinutes(1); | |
| ServicePointManager.DefaultConnectionLimit = 12; | |
| DiagnosticMonitorConfiguration diagConfig = DiagnosticMonitor.GetDefaultInitialConfiguration(); | |
| diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferLogLevelFilter = LogLevel.Information; | |
| diagConfig.DiagnosticInfrastructureLogs.ScheduledTransferPeriod = scheduledTransferPeriod; | |
| diagConfig.WindowsEventLog.ScheduledTransferLogLevelFilter = LogLevel.Warning; | |
| diagConfig.WindowsEventLog.ScheduledTransferPeriod = scheduledTransferPeriod; | |
| diagConfig.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose; | |
| diagConfig.Logs.ScheduledTransferPeriod = scheduledTransferPeriod; | |
| diagConfig.Directories.DataSources.Add(new DirectoryConfiguration | |
| { | |
| Path = new DirectoryInfo(@"SetupScripts\setuplogs").FullName, | |
| Container = "setupscriptlogs", | |
| DirectoryQuotaInMB = 100 | |
| }); | |
| diagConfig.Directories.ScheduledTransferPeriod = scheduledTransferPeriod; | |
| diagConfig.ConfigurationChangePollInterval = TimeSpan.FromMinutes(1); | |
| DiagnosticMonitor.Start(DiagnosticsConnectionString, diagConfig); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment