Logs a message with an optional time stamp at a given logging level.
Namespace: Microsoft.MetadirectoryServices.Logging
Assembly: Logging (in logging.dll)

Usage

Visual Basic
Dim logMessage As String
Dim addTimeStamp As Boolean
Dim loggingLevel As Integer

Logging.Log(logMessage, addTimeStamp, loggingLevel)

Syntax

Visual Basic
Public Shared Sub Log ( _
		logMessage As String, _
		<OptionalAttribute> Optional addTimeStamp As Boolean = True, _
		<OptionalAttribute> Optional loggingLevel As Integer = 1 _
)
C#
public static void Log (
		string logMessage,
		[OptionalAttribute] bool addTimeStamp,
		[OptionalAttribute] int loggingLevel
)
C++
public:
static void Log (
		String^ logMessage, 
		[OptionalAttribute] bool addTimeStamp, 
		[OptionalAttribute] int loggingLevel
)
J#
public static void Log (
		String logMessage, 
		/** @attribute OptionalAttribute() */ boolean addTimeStamp, 
		/** @attribute OptionalAttribute() */ int loggingLevel
)
JScript
public static function Log (
		logMessage : String, 
		addTimeStamp : boolean, 
		loggingLevel : int
)

Parameters

logMessage

The message to log.

addTimeStamp

Whether to include a time stamp.

loggingLevel

The logging level at which the message is written to the log.

Remarks

The message is logged only if the loggingLevel is less than or equal to the level that is set in logging.xml.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also