Show / Hide Table of Contents

    Interface IIKLogger

    Handles all of IdleKits logging and exceptions.

    Namespace: IdleKit.Core
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IIKLogger

    Methods

    ClearLogs(Func<LogEntry, Boolean>)

    Clears all logs that meet the clearPredicate criteria.

    Declaration
    void ClearLogs(Func<LogEntry, bool> clearPredicate)
    Parameters
    Type Name Description
    Func<LogEntry, Boolean> clearPredicate

    The criteria that logs must meet in order to be cleared.

    GetLogs(LogSeverity, Func<LogEntry, Boolean>)

    Returns all logs matching the severityMask and meeting the selectionPredicate criteria.

    Declaration
    List<LogEntry> GetLogs(LogSeverity severityMask, Func<LogEntry, bool> selectionPredicate)
    Parameters
    Type Name Description
    LogSeverity severityMask

    The LogSeverity to filter by.

    Func<LogEntry, Boolean> selectionPredicate

    The criteria that logs must meet before being returned.

    Returns
    Type Description
    List<LogEntry>

    HandleException(Exception, ILogCategory)

    Handles an exception. if set to not throw exceptions, the exception will be output to the console.

    Declaration
    void HandleException(Exception exception, ILogCategory category)
    Parameters
    Type Name Description
    Exception exception

    The exception to handle.

    ILogCategory category

    The ILogCategory to use if outputting the exception to the console.

    IsCategoryActive(ILogCategory)

    Returns true if the provided ILogCategory is currently active. An inactive category will not be visible in the console.

    Declaration
    bool IsCategoryActive(ILogCategory category)
    Parameters
    Type Name Description
    ILogCategory category

    The ILogCategory to check.

    Returns
    Type Description
    Boolean

    Log(LogSeverity, String, ILogCategory)

    Logs a message to the console with a severity and category.

    Declaration
    void Log(LogSeverity severity, string message, ILogCategory category)
    Parameters
    Type Name Description
    LogSeverity severity

    The LogSeverity of this message.

    String message

    The message to output to the console.

    ILogCategory category

    The category this message belongs to. This can be used for organizational or visual purposes.

    ToggleCategory(ILogCategory, Boolean)

    Toggles a ILogCategory active state. An inactive category will not be visible in the console.

    Declaration
    void ToggleCategory(ILogCategory category, bool isActive)
    Parameters
    Type Name Description
    ILogCategory category

    The ILogCategory to toggle.

    Boolean isActive

    The state the ILogCategory should be set to.

    ToggleCategoryId(String, Boolean)

    Toggles a ILogCategory active state. An inactive category will not be visible in the console.

    Declaration
    void ToggleCategoryId(string categoryId, bool isActive)
    Parameters
    Type Name Description
    String categoryId

    The category ID to toggle.

    Boolean isActive

    The state the category should be set to.

    ToggleCustomStackTraces(Boolean)

    Toggles custom stack traces on or off. These custom stack traces are more readable, and avoid including Debug classes.

    Declaration
    void ToggleCustomStackTraces(bool isActive)
    Parameters
    Type Name Description
    Boolean isActive

    If true, custom stack traces will be used.

    ToggleTagColorsInLogs(Boolean)

    Toggles tag colors on or off.

    Declaration
    void ToggleTagColorsInLogs(bool colorTags)
    Parameters
    Type Name Description
    Boolean colorTags

    If true, tags will be colored.

    ToggleTagsInLogs(Boolean)

    Toggles tags on or off. Tags are prepended to log output and can be a helpful visual aid.

    Declaration
    void ToggleTagsInLogs(bool showTags)
    Parameters
    Type Name Description
    Boolean showTags

    If true, tags will be shown.

    ToggleThrowExceptions(Boolean)

    Toggles throwing exceptions on or off.

    Declaration
    void ToggleThrowExceptions(bool throwExceptions)
    Parameters
    Type Name Description
    Boolean throwExceptions

    If true, exceptions will be thrown and not logged to the console.

    Events

    OnExceptionHandled

    Dispatched when an exception has been handled.

    Declaration
    event Action<Exception> OnExceptionHandled
    Event Type
    Type Description
    Action<Exception>

    OnLogReceived

    Dispatched when a message has been logged.

    Declaration
    event Action<LogEntry> OnLogReceived
    Event Type
    Type Description
    Action<LogEntry>
    Back to top Copyright © 2020 East Side Games Inc.