Class DefaultLogger
Inheritance
DefaultLogger
Assembly: cs.temp.dll.dll
Syntax
public class DefaultLogger : IIKLogger
Fields
Declaration
protected bool _colorTags
Field Value
_currentEntry
Declaration
protected LogEntry _currentEntry
Field Value
_defaultErrorStackType
Declaration
protected readonly StackTraceLogType _defaultErrorStackType
Field Value
Type |
Description |
StackTraceLogType |
|
_defaultLogStackType
Declaration
protected readonly StackTraceLogType _defaultLogStackType
Field Value
Type |
Description |
StackTraceLogType |
|
_defaultWarningStackType
Declaration
protected readonly StackTraceLogType _defaultWarningStackType
Field Value
Type |
Description |
StackTraceLogType |
|
_disabledCategoryIds
Declaration
protected readonly HashSet<string> _disabledCategoryIds
Field Value
Type |
Description |
HashSet<String> |
|
_history
Declaration
protected readonly List<LogEntry> _history
Field Value
Declaration
Field Value
_stringBuilder
Declaration
protected readonly StringBuilder _stringBuilder
Field Value
Type |
Description |
StringBuilder |
|
_throwExceptions
Declaration
protected bool _throwExceptions
Field Value
_useCustomStackTrace
Declaration
protected bool _useCustomStackTrace
Field Value
Methods
AddToHistory(LogEntry)
Declaration
protected virtual void AddToHistory(LogEntry entry)
Parameters
BuildCustomStackTrace()
Declaration
protected virtual string BuildCustomStackTrace()
Returns
BuildMessage(ILogCategory, String)
Declaration
protected virtual string BuildMessage(ILogCategory category, string message)
Parameters
Returns
ClearLogs(Func<LogEntry, Boolean>)
Declaration
public virtual void ClearLogs(Func<LogEntry, bool> clearPredicate = null)
Parameters
ConstructEntry(ILogCategory, LogSeverity, String)
Declaration
protected virtual LogEntry ConstructEntry(ILogCategory category, LogSeverity severity, string message)
Parameters
Returns
DisableDefaultStackTrace()
Declaration
protected virtual void DisableDefaultStackTrace()
GetLogs(LogSeverity, Func<LogEntry, Boolean>)
Declaration
public virtual List<LogEntry> GetLogs(LogSeverity severityMask, Func<LogEntry, bool> selectionPredicate = null)
Parameters
Returns
HandleException(Exception, ILogCategory)
Declaration
public virtual void HandleException(Exception exception, ILogCategory category)
Parameters
HandleLogMessageReceived(String, String, LogType)
Declaration
protected virtual void HandleLogMessageReceived(string condition, string stacktrace, LogType type)
Parameters
Type |
Name |
Description |
String |
condition |
|
String |
stacktrace |
|
LogType |
type |
|
IsCategoryActive(ILogCategory)
Declaration
public virtual bool IsCategoryActive(ILogCategory category)
Parameters
Returns
IsLogDisabled(ILogCategory, LogSeverity)
Declaration
protected virtual bool IsLogDisabled(ILogCategory category, LogSeverity severity)
Parameters
Returns
Log(LogSeverity, String, ILogCategory)
Declaration
public virtual void Log(LogSeverity severity, string message, ILogCategory category)
Parameters
Log(String)
Declaration
protected virtual void Log(string message)
Parameters
Type |
Name |
Description |
String |
message |
|
LogError(String)
Declaration
protected virtual void LogError(string message)
Parameters
Type |
Name |
Description |
String |
message |
|
LogWarning(String)
Declaration
protected virtual void LogWarning(string message)
Parameters
Type |
Name |
Description |
String |
message |
|
LogWithSeverity(LogSeverity, String)
Declaration
protected virtual void LogWithSeverity(LogSeverity severity, string message)
Parameters
LogWithStacktrace(LogSeverity, String, String)
Declaration
protected virtual void LogWithStacktrace(LogSeverity severity, string message, string stackTrace)
Parameters
OutputLog(LogEntry)
Declaration
protected virtual void OutputLog(LogEntry entry)
Parameters
ReenableDefaultStackTrace()
Declaration
protected virtual void ReenableDefaultStackTrace()
ToggleCategory(ILogCategory, Boolean)
Declaration
public virtual void ToggleCategory(ILogCategory category, bool isActive)
Parameters
ToggleCategoryId(String, Boolean)
Declaration
public virtual void ToggleCategoryId(string categoryId, bool isActive)
Parameters
ToggleCustomStackTraces(Boolean)
Declaration
public virtual void ToggleCustomStackTraces(bool isActive)
Parameters
Type |
Name |
Description |
Boolean |
isActive |
|
ToggleTagColorsInLogs(Boolean)
Declaration
public virtual void ToggleTagColorsInLogs(bool colorTags)
Parameters
Type |
Name |
Description |
Boolean |
colorTags |
|
Declaration
public virtual void ToggleTagsInLogs(bool showTags)
Parameters
Type |
Name |
Description |
Boolean |
showTags |
|
ToggleThrowExceptions(Boolean)
Declaration
public virtual void ToggleThrowExceptions(bool throwExceptions)
Parameters
Type |
Name |
Description |
Boolean |
throwExceptions |
|
Events
OnExceptionHandled
Declaration
public virtual event Action<Exception> OnExceptionHandled
Event Type
OnLogReceived
Declaration
public virtual event Action<LogEntry> OnLogReceived
Event Type
Implements