Example #1
0
 void OnChannelLoggingEnabled(ILoggingChannel sender, object args)
 {
     // This method is called when the channel is informing us of channel-related state changes.
     // Save new channel state. These values can be used for advanced logging scenarios where,
     // for example, it's desired to skip blocks of logging code if the channel is not being
     // consumed by any sessions.
     isChannelEnabled    = sender.Enabled;
     channelLoggingLevel = sender.Level;
 }
 void OnChannelLoggingEnabled(ILoggingChannel sender, object args)
 {
     // This method is called when the channel is informing us of channel-related state changes.
     // Save new channel state. These values can be used for advanced logging scenarios where, 
     // for example, it's desired to skip blocks of logging code if the channel is not being
     // consumed by any sessions. 
     isChannelEnabled = sender.Enabled;
     channelLoggingLevel = sender.Level;
 }