Initializes a new instance of the LogEntry class.
Namespace:
CuttingEdge.LoggingAssembly: CuttingEdge.Logging (in CuttingEdge.Logging.dll)
Syntax
| Visual Basic (Declaration) |
|---|
Public Sub New ( _ severity As LoggingEventType, _ message As String, _ source As String, _ exception As Exception _ ) |
| C# |
|---|
public LogEntry( LoggingEventType severity, string message, string source, Exception exception ) |
| Visual C++ |
|---|
public: LogEntry( LoggingEventType severity, String^ message, String^ source, Exception^ exception ) |
| JavaScript |
|---|
CuttingEdge.Logging.LogEntry = function(severity, message, source, exception); |
Parameters
- severity
- Type: CuttingEdge.Logging..::.LoggingEventType
The severity of the event.
- message
- Type: System..::.String
The message of the event.
- source
- Type: System..::.String
The optional source to log.
- exception
- Type: System..::.Exception
An optional exception to log.
Exceptions
| Exception | Condition |
|---|---|
| System..::.ArgumentNullException | Thrown when the given message is a null reference. |
| System..::.ArgumentException | Thrown when the given message is an empty string. |
| System.ComponentModel..::.InvalidEnumArgumentException | Thrown whenseverityhas an invalid value. |