Class SpyLogService
Spy ILogService that records whether warnings/errors were logged.
Inheritance
SpyLogService
Implements
ILogService
IService
IFoundationSettings
Assembly: Tests.dll
Syntax
public class SpyLogService : ILogService, IService, IFoundationSettings
Constructors
SpyLogService()
Declaration
Fields
ErrorLogged
Declaration
Field Value
LastErrorMessage
Declaration
public string LastErrorMessage
Field Value
LastWarningMessage
Declaration
public string LastWarningMessage
Field Value
WarningLogged
Declaration
public bool WarningLogged
Field Value
Properties
Guid
Declaration
public string Guid { get; set; }
Property Value
Id
Declaration
public string Id { get; set; }
Property Value
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
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
WriteExceptionLog(Exception, string, string, params string[])
Declaration
public void WriteExceptionLog(Exception exception, string message = null, string category = null, params string[] tags)
Parameters
Declaration
public void WriteInformationLog(string message, string category = null, params string[] tags)
Parameters
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
WriteWarningLog(string, string, params string[])
Declaration
public void WriteWarningLog(string message, string category = null, params string[] tags)
Parameters
Implements
Serenity.Logging.Application.Interfaces.ILogService
Serenity.Global.Application.Interfaces.IService
Serenity.Global.Domain.Interfaces.IFoundationSettings