Line | |
---|
1 | using System;
|
---|
2 | using System.Diagnostics;
|
---|
3 | using System.IO;
|
---|
4 | using Microsoft.WindowsAzure.Diagnostics;
|
---|
5 | using Microsoft.WindowsAzure.ServiceRuntime;
|
---|
6 |
|
---|
7 | namespace HeuristicLab.Services.Hive.WebRole {
|
---|
8 | public class AzureLocalStorageTraceListener : XmlWriterTraceListener {
|
---|
9 | public AzureLocalStorageTraceListener()
|
---|
10 | : base(Path.Combine(AzureLocalStorageTraceListener.GetLogDirectory().Path, "HeuristicLab.Services.Hive.WebRole.svclog")) {
|
---|
11 | }
|
---|
12 |
|
---|
13 | public static DirectoryConfiguration GetLogDirectory() {
|
---|
14 | DirectoryConfiguration directory = new DirectoryConfiguration();
|
---|
15 | directory.Container = "wad-tracefiles";
|
---|
16 | directory.DirectoryQuotaInMB = 10;
|
---|
17 | directory.Path = RoleEnvironment.GetLocalResource("HeuristicLab.Services.Hive.WebRole.svclog").RootPath;
|
---|
18 | return directory;
|
---|
19 | }
|
---|
20 | }
|
---|
21 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.