Click to Rate and Give Feedback
MSDN
MSDN Library
Collapse All/Expand All Collapse All
RoleManager.WriteToLog Method
Writes a string value to the log.

Namespace: Microsoft.ServiceHosting.ServiceRuntime
Assembly: Microsoft.ServiceHosting.ServiceRuntime (in microsoft.servicehosting.serviceruntime.dll)
Dim eventLogName As String
Dim message As String

RoleManager.WriteToLog(eventLogName, message)
Visual Basic
Public Shared Sub WriteToLog ( _
    eventLogName As String, _
    message As String _
)
C#
public static void WriteToLog (
    string eventLogName,
    string message
)
C++
public:
static void WriteToLog (
    String^ eventLogName, 
    String^ message
)
J#
public static void WriteToLog (
    String eventLogName, 
    String message
)
JScript
public static function WriteToLog (
    eventLogName : String, 
    message : String
)

Parameters

eventLogName

The type of event to be written to the log. Permitted string values are Critical, Error, Warning, Information, Verbose.

message

The message to write to the log.

Log entries marked with the Critical designation are also raised as alerts to the service via the alerting interface. Because these alerts must be reviewed by an operator, Critical messages should be used only for urgent notifications.

All other types of messages are written only to the logging store.

For easier troubleshooting, always log messages verbosely.


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

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008, and Windows 2000

Target Platforms

© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement | Site Feedback
Page view tracker