Struct LogMessage
Provides a message object used for logging purposes.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public struct LogMessage
Constructors
| Improve this Doc View SourceLogMessage(LogSeverity, String, String, Exception)
Initializes a new LogMessage struct with the severity, source, message of the event, and optionally, an exception.
Declaration
public LogMessage(LogSeverity severity, string source, string message, Exception exception = null)
Parameters
| Type | Name | Description |
|---|---|---|
| LogSeverity | severity | The severity of the event. |
| System.String | source | The source of the event. |
| System.String | message | The message of the event. |
| System.Exception | exception | The exception of the event. |
Properties
| Improve this Doc View SourceException
Gets the exception of this log entry.
Declaration
public Exception Exception { get; }
Property Value
| Type | Description |
|---|---|
| System.Exception | An Exception object associated with an incident; otherwise |
Message
Gets the message of this log entry.
Declaration
public string Message { get; }
Property Value
| Type | Description |
|---|---|
| System.String | A string containing the message of this log entry. |
Severity
Gets the severity of the log entry.
Declaration
public LogSeverity Severity { get; }
Property Value
| Type | Description |
|---|---|
| LogSeverity | A LogSeverity enum to indicate the severeness of the incident or event. |
Source
Gets the source of the log entry.
Declaration
public string Source { get; }
Property Value
| Type | Description |
|---|---|
| System.String | A string representing the source of the log entry. |
Methods
| Improve this Doc View SourceToString()
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |
Overrides
System.ValueType.ToString()
|
Improve this Doc
View Source
ToString(StringBuilder, Boolean, Boolean, DateTimeKind, Nullable<Int32>)
Declaration
public string ToString(StringBuilder builder = null, bool fullException = true, bool prependTimestamp = true, DateTimeKind timestampKind = DateTimeKind.Local, int? padSource)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Text.StringBuilder | builder | |
| System.Boolean | fullException | |
| System.Boolean | prependTimestamp | |
| System.DateTimeKind | timestampKind | |
| System.Nullable<System.Int32> | padSource |
Returns
| Type | Description |
|---|---|
| System.String |