Exemplo n.º 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());
        }
Exemplo n.º 2
0
 public AzureLocalStorageTraceListener()
     : base(Path.Combine(AzureLocalStorageTraceListener.GetLogDirectory().Path, "Bermuda.Service.svclog"))
 {
 }