in my Azure app I have Trace.WriteLine() calls sprinkled about to track what the application is doing.
What is stumping me is that some of these make it to the log and others don't. For example, this snippet of code from my worker role OnStart() method:
Trace.WriteLine("WorkerRole: creating storage tables", "Information");
CloudStorageAccount account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
CloudTableClient tableClient = account.CreateCloudTableClient();
if (tableClient.CreateTableIfNotExist("Devices")) {
Trace.WriteLine("WorkerRole.OnStart: Devices table created", "Information");
}else{
Trace.WriteLine("WorkerRole.OnStart: Devices table not created. Already exists?", "Information");
}
The first Trace gets logged. Neither of the Trace calls in the if statement gutted logged. Then a Trace method in a subsequently executing method does get logged.
Any ideas?