Partilhar via


LogId(String, ServiceMoniker) Constructor

Definition

Initializes a new instance of the LogId struct.

public:
 LogId(System::String ^ logName, Microsoft::ServiceHub::Framework::ServiceMoniker ^ serviceId);
public LogId (string logName, Microsoft.ServiceHub.Framework.ServiceMoniker? serviceId);
new Microsoft.VisualStudio.RpcContracts.Logging.LogId : string * Microsoft.ServiceHub.Framework.ServiceMoniker -> Microsoft.VisualStudio.RpcContracts.Logging.LogId
Public Sub New (logName As String, serviceId As ServiceMoniker)

Parameters

logName
String

The fully-qualified name of the log stream. This should be globally unique. The String should be similar to a fully-qualified C# class name, like "Microsoft.VisualStudio.Debugger". Specifically, at least one "." must appear in the name, the name may not begin, nor end with a "." and no more than one "." may appear in a row (no ".." in the name). Allowable characters for the name are: A-Z, a-z, 0-9 and _. The "." is also an allowable character with the restrictions above.

serviceId
ServiceMoniker

The optional ServiceMoniker representing the service that generates the log stream identified by this LogId. This should always be specified if the source is a RPC service and be null when the source is not an RPC service.

Exceptions

Throws ArgumentException when logName empty or null.

Throws ArgumentOutOfRangeException when logName is not a fully-qualified log name that contains at least 1 '.' delineating a namespace-like prefix or contains characters other than A-Z, a-z, 0-9 and _.

Applies to