Search Results for

    Show / Hide Table of Contents

    Class Log

    A set of tools to print messages to the server console.

    Inheritance
    System.Object
    Log
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Features
    Assembly: Exiled.API.dll
    Syntax
    public static class Log

    Properties

    | Improve this Doc View Source

    DebugEnabled

    Gets a System.Collections.Generic.HashSet<T> of plugin assemblies that have debug logs enabled.

    Declaration
    public static HashSet<Assembly> DebugEnabled { get; }
    Property Value
    Type Description
    System.Collections.Generic.HashSet<System.Reflection.Assembly>

    Methods

    | Improve this Doc View Source

    Assert(Boolean, Object)

    Sends an Error(Object) with the provided message if the condition is false and stops the execution. For example:

    Player ply = Player.Get(2);
    Log.Assert(ply is not null, "The player with the id 2 is null");

    results in it logging an error if the player is null and not continuing.

    Declaration
    public static void Assert(bool condition, object message)
    Parameters
    Type Name Description
    System.Boolean condition

    The conditional expression to evaluate. If the condition is true it will continue.

    System.Object message

    The information message. The error and exception will show this message.

    Exceptions
    Type Condition
    System.Exception

    If the condition is false. It throws an exception stopping the execution.

    | Improve this Doc View Source

    Debug(Object)

    Sends a Discord.LogLevel.Debug level messages to the game console. Server must have exiled_debug config enabled.

    Declaration
    public static void Debug(object message)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    | Improve this Doc View Source

    Debug(String)

    Sends a Discord.LogLevel.Debug level messages to the game console. Server must have exiled_debug config enabled.

    Declaration
    public static void Debug(string message)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    | Improve this Doc View Source

    DebugObject<T>(T)

    Sends a Discord.LogLevel.Debug level messages to the game console. Server must have exiled_debug config enabled.

    Declaration
    public static T DebugObject<T>(T object)
    Parameters
    Type Name Description
    T object

    The object to be logged and returned.

    Returns
    Type Description
    T

    Returns the T object inputted in object.

    Type Parameters
    Name Description
    T

    The inputted object's type.

    | Improve this Doc View Source

    Error(Object)

    Sends a Discord.LogLevel.Error level messages to the game console. This should be used to send errors only. It's recommended to send any messages in the catch block of a try/catch as errors with the exception string.

    Declaration
    public static void Error(object message)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    | Improve this Doc View Source

    Error(String)

    Sends a Discord.LogLevel.Error level messages to the game console. This should be used to send errors only. It's recommended to send any messages in the catch block of a try/catch as errors with the exception string.

    Declaration
    public static void Error(string message)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    | Improve this Doc View Source

    Info(Object)

    Sends a Discord.LogLevel.Info level messages to the game console.

    Declaration
    public static void Info(object message)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    | Improve this Doc View Source

    Info(String)

    Sends a Discord.LogLevel.Info level messages to the game console.

    Declaration
    public static void Info(string message)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    | Improve this Doc View Source

    Send(Object, LogLevel, ConsoleColor)

    Sends a log message to the game console.

    Declaration
    public static void Send(object message, LogLevel level, ConsoleColor color = ConsoleColor.Gray)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    Discord.LogLevel level

    The message level of importance.

    System.ConsoleColor color

    The message color.

    | Improve this Doc View Source

    Send(String, LogLevel, ConsoleColor)

    Sends a log message to the game console.

    Declaration
    public static void Send(string message, LogLevel level, ConsoleColor color = ConsoleColor.Gray)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    Discord.LogLevel level

    The message level of importance.

    System.ConsoleColor color

    The message color.

    | Improve this Doc View Source

    SendRaw(Object, ConsoleColor)

    Sends a raw log message to the game console.

    Declaration
    public static void SendRaw(object message, ConsoleColor color)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    System.ConsoleColor color

    The System.ConsoleColor of the message.

    | Improve this Doc View Source

    SendRaw(String, ConsoleColor)

    Sends a raw log message to the game console.

    Declaration
    public static void SendRaw(string message, ConsoleColor color)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    System.ConsoleColor color

    The System.ConsoleColor of the message.

    | Improve this Doc View Source

    Warn(Object)

    Sends a Discord.LogLevel.Warn level messages to the game console.

    Declaration
    public static void Warn(object message)
    Parameters
    Type Name Description
    System.Object message

    The message to be sent.

    | Improve this Doc View Source

    Warn(String)

    Sends a Discord.LogLevel.Warn level messages to the game console.

    Declaration
    public static void Warn(string message)
    Parameters
    Type Name Description
    System.String message

    The message to be sent.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX