logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class SpyLogService

    Spy ILogService that records whether warnings/errors were logged.

    Inheritance
    object
    SpyLogService
    Implements
    ILogService
    IService
    IFoundationSettings
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Global.Tests.Application
    Assembly: Tests.dll
    Syntax
    public class SpyLogService : ILogService, IService, IFoundationSettings

    Constructors

    SpyLogService()

    Declaration
    public SpyLogService()

    Fields

    ErrorLogged

    Declaration
    public bool ErrorLogged
    Field Value
    Type Description
    bool

    LastErrorMessage

    Declaration
    public string LastErrorMessage
    Field Value
    Type Description
    string

    LastWarningMessage

    Declaration
    public string LastWarningMessage
    Field Value
    Type Description
    string

    WarningLogged

    Declaration
    public bool WarningLogged
    Field Value
    Type Description
    bool

    Properties

    Guid

    Declaration
    public string Guid { get; set; }
    Property Value
    Type Description
    string

    Id

    Declaration
    public string Id { get; set; }
    Property Value
    Type Description
    string

    LogService

    Declaration
    public ILogService LogService { get; set; }
    Property Value
    Type Description
    ILogService

    Verbosity

    Declaration
    public LogVerbosity Verbosity { get; set; }
    Property Value
    Type Description
    LogVerbosity

    Methods

    ClearCategoryVerbosity(string)

    Declaration
    public void ClearCategoryVerbosity(string category)
    Parameters
    Type Name Description
    string category

    For(string)

    Declaration
    public ILoggerComponent For(string category)
    Parameters
    Type Name Description
    string category
    Returns
    Type Description
    ILoggerComponent

    GetEffectiveVerbosity(string)

    Declaration
    public LogVerbosity GetEffectiveVerbosity(string category)
    Parameters
    Type Name Description
    string category
    Returns
    Type Description
    LogVerbosity

    IsEnabledFor(string, LogSeverity)

    Declaration
    public bool IsEnabledFor(string category, LogSeverity severity)
    Parameters
    Type Name Description
    string category
    LogSeverity severity
    Returns
    Type Description
    bool

    SetCategoryVerbosity(string, LogVerbosity?)

    Declaration
    public void SetCategoryVerbosity(string category, LogVerbosity? verbosity)
    Parameters
    Type Name Description
    string category
    LogVerbosity? verbosity

    WriteErrorLog(string, string, params string[])

    Declaration
    public void WriteErrorLog(string message, string category = null, params string[] tags)
    Parameters
    Type Name Description
    string message
    string category
    string[] tags

    WriteExceptionLog(Exception, string, string, params string[])

    Declaration
    public void WriteExceptionLog(Exception exception, string message = null, string category = null, params string[] tags)
    Parameters
    Type Name Description
    Exception exception
    string message
    string category
    string[] tags

    WriteInformationLog(string, string, params string[])

    Declaration
    public void WriteInformationLog(string message, string category = null, params string[] tags)
    Parameters
    Type Name Description
    string message
    string category
    string[] tags

    WriteLog(LogEntry)

    Declaration
    public void WriteLog(LogEntry entry)
    Parameters
    Type Name Description
    LogEntry entry

    WriteVerboseLog(string, string, params string[])

    Declaration
    public void WriteVerboseLog(string message, string category = null, params string[] tags)
    Parameters
    Type Name Description
    string message
    string category
    string[] tags

    WriteWarningLog(string, string, params string[])

    Declaration
    public void WriteWarningLog(string message, string category = null, params string[] tags)
    Parameters
    Type Name Description
    string message
    string category
    string[] tags

    Implements

    ILogService
    IService
    IFoundationSettings
    In this article
    © 2026 Serenity. All Rights Reserved