Show / Hide Table of Contents

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 Source

LogMessage(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 Source

Exception

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 null.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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 Source

ToString()

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
  • Improve this Doc
  • View Source
Back to top Generated by DocFX