LoggingChannel class

Applies to Windows and Windows Phone

Represents a source of log messages.

Syntax


public ref class LoggingChannel sealed : ILoggingChannel,
    IClosable

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

Members

The LoggingChannel class has these types of members:

Constructors

The LoggingChannel class has these constructors.

ConstructorDescription
LoggingChannel Initializes a new instance of the LoggingChannel class.

 

Events

The LoggingChannel class has these events.

EventDescription
LoggingEnabled Raised when the logging channel is attached to a LoggingSession or other event tracing and debugging tools.

 

Methods

The LoggingChannel class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Close [C++, JavaScript]Ends logging on the current logging channel.
Dispose [C#, VB]Performs tasks associated with freeing, releasing, or resetting unmanaged resources.
LogMessage(String) Logs a message to the current LoggingChannel.
LogMessage(String, LoggingLevel) Logs a message to the current LoggingChannel with the specified LoggingLevel.
LogValuePair(String, Int32) Logs data to the current LoggingChannel.
LogValuePair(String, Int32, LoggingLevel) Logs data to the current LoggingChannel with the specified LoggingLevel.

 

Properties

The LoggingChannel class has these properties.

PropertyAccess typeDescription

Enabled

Read-onlyGets a value that indicates whether messages are being logged on the current channel.

Level

Read-onlyGets the level of detail for messages from the current logging channel.

Name

Read-onlyGets the name of the current LoggingChannel.

 

Remarks

Add LoggingChannel instances to a LoggingSession or a FileLoggingSession to enable logging in your app.

Requirements

Minimum supported client

Windows 8.1 [Windows Store apps only]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Foundation.Diagnostics
Windows::Foundation::Diagnostics [C++]

Metadata

Windows.winmd

See also

LoggingSession
FileLoggingSession
Object
ILoggingChannel
IClosable

 

 

Show:
© 2014 Microsoft