Compartilhar via


Logging.Error Method (String, String)

Displays messages that represent a problem.

Namespace: Microsoft.Uii.Common.Logging
Assembly: Microsoft.Uii.Common.Logging (in Microsoft.Uii.Common.Logging.dll)

Usage

'Usage
Dim appName As String
Dim message As String

Logging.Error(appName, message)

Syntax

'Declaration
Public Shared Sub Error ( _
    appName As String, _
    message As String _
)
public static void Error (
    string appName,
    string message
)
public:
static void Error (
    String^ appName, 
    String^ message
)
public static void Error (
    String appName, 
    String message
)
public static function Error (
    appName : String, 
    message : String
)

Parameters

  • appName
    Specifies the name of the application.
  • message
    Specifies the message to place in the log.

Exceptions

Exception type Condition
ConfigurationErrorsException

Configuration-related exceptions are wrapped in this common exception type.

InvalidOperationException

Logging listeners are not permitted to call methods of the Logging class.

Remarks

It only displays when the TraceSwitch is assigned TraceError. It takes the string passed in and sends it to any trace listener. It also will display it in a list control if one has been made available or in the various logs.

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

See Also

Reference

Logging Class
Logging Members
Microsoft.Uii.Common.Logging Namespace

Unified Service Desk
Send comments about this topic to Microsoft.
© 2015 Microsoft. All rights reserved.