Пример #1
0
        public override bool OnStart()
        {
            // To enable the AzureLocalStorageTraceListner, uncomment relevent section in the web.config
            DiagnosticMonitorConfiguration diagnosticConfig = DiagnosticMonitor.GetDefaultInitialConfiguration();

            diagnosticConfig.Directories.ScheduledTransferPeriod = TimeSpan.FromMinutes(1);
            diagnosticConfig.Directories.DataSources.Add(AzureLocalStorageTraceListener.GetLogDirectory());

            HostEnvironment.Instance.Initialize(new AzureHostEnvironmentConfiguration());

            return(base.OnStart());
        }
Пример #2
0
 public AzureLocalStorageTraceListener()
     : base(Path.Combine(AzureLocalStorageTraceListener.GetLogDirectory().Path, "Bermuda.Service.svclog"))
 {
 }