microsoft.public.sqlserver.notificationsvcs
[Top] [All Lists]

Re: Controlling logging

Subject: Re: Controlling logging
From: "Andy Wilbourn"
Date: Wed, 21 Dec 2005 08:10:18 -0500
Newsgroups: microsoft.public.sqlserver.notificationsvcs
I have something similar in my app. All you need to do is create a section 
in the NS config file.

<configuration>
    .... <NS Stuff>
<appSettings>
  <add key="MQIVRDebugMode" value="0" />
 </appSettings>
</configuration>

Then in your code you read from a config file like normal.

"Mark Bosley" <[email protected]> wrote in message 
news:[email protected]
>I see that I can set the level of logging of a NS-SQL service thru the 
>NSService.Exe.config file
> eg
>
> <system.diagnostics>
>  <switches>
>   <add name="LogAdministrative" value="2"/>
>   <add name="LogService" value="4"/> ........
>
> But I am doing some domain specific logging on my own  and I would like to 
> set the logging level
> thru "Startup Parameters" or ..... what
>
> In my code what I would like is something like
>
> if (AppLogLevel == "VERBOSE")
>    nsEventLog.WriteEntry( logMessage, entryType, (int)eventID);
>
> What would AppLogLevel be? Thanks
> Mark
> 



<Prev in Thread] Current Thread [Next in Thread>