RoleManager.WriteToLog Method
Writes a string value to the log.
Namespace: Microsoft.ServiceHosting.ServiceRuntime
Assembly: Microsoft.ServiceHosting.ServiceRuntime (in microsoft.servicehosting.serviceruntime.dll)
Usage
Dim eventLogName As String Dim message As StringRoleManager.WriteToLog(eventLogName, message)
Syntax
'Declaration
Public Shared Sub WriteToLog ( _
eventLogName As String, _
message As String _
)
public static void WriteToLog (
string eventLogName,
string message
)
public:
static void WriteToLog (
String^ eventLogName,
String^ message
)
public static void WriteToLog (
String eventLogName,
String message
)
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.
Remarks
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.
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
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008, and Windows 2000
Target Platforms
See Also
Reference
RoleManager Class
RoleManager Members
Microsoft.ServiceHosting.ServiceRuntime Namespace