Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable WindowsAzure.ServiceRuntime verbose output

When I run my Azure project I get every 20 seconds or so this message in my output:

Microsoft.WindowsAzure.ServiceRuntime Verbose: 500 : Role instance status check starting Microsoft.WindowsAzure.ServiceRuntime Verbose: 502 : Role instance status check succeeded: Ready

Is there any way to disable these output messages? Like change the log level higher? I prefer to keep the output more clean for important messages like exceptions or binding errors.

like image 462
John Bauer Avatar asked Dec 22 '11 11:12

John Bauer


1 Answers

This has been bugging me for a while; but I've finally found a solution.

You want to change the Tracing level for the RoleEnviorment from All (which includes verbose); to for example Information.

Add the following code to the beginning of the Role OnStart to switch to Information tracing:

Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.TraceSource.Switch.Level
 = SourceLevels.Information;

You should find you no longer get the Role check messages.

like image 82
Ben Adams Avatar answered Oct 20 '22 15:10

Ben Adams