John Bauer
John Bauer

Reputation: 91

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.

Upvotes: 9

Views: 2357

Answers (2)

Ben Adams
Ben Adams

Reputation: 3441

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.

Upvotes: 23

BrentDaCodeMonkey
BrentDaCodeMonkey

Reputation: 5523

I believe that message is produced by the azure agent/emulator. I don't believe its (easily) possible to stop that message since its coming from outside of your process. I'm sure there's like some hacks somewhere to remove it, but I'm not sure I'd want to go there.

Upvotes: -2

Related Questions