Class Logger
Main class of Logging library. Contains Sinks, unique identifier LoggerHandle
Implements
Inherited Members
Namespace: Unity.Logging
Assembly: solution.dll
Syntax
public class Logger : IDisposable
Constructors
Name | Description |
---|---|
Logger(LoggerConfig) | Constructor |
Fields
Name | Description |
---|---|
Config | Config that was used in Logger construction |
Handle | Unique id |
Properties
Name | Description |
---|---|
MinimalLogLevelAcrossAllSystems | Minimal LogLevel that this Logger will process (means it has sinks for it) |
SinksCount | Returns count of sinks that this Logger has |
Methods
Name | Description |
---|---|
AddSink(SinkConfiguration) | Creates new sink using SinkConfiguration |
AddSink(SinkConfiguration, ref LogControllerScopedLock) | Creates new sink using SinkConfiguration |
Dispose() | Disposes the Logger. See IDisposable |
GetOrCreateSink<T>(SinkConfiguration) | Get or create sink of type T |
GetSink(int) | Returns sink number i. Used for debugging |
GetSink<T>() | Returns the sink of type T. Will return first one if there are several ones of the type T |
HasSinksFor(LogLevel) | Returns true if this Logger can process messages with LogLevel level. |
SetMinimalLogLevelAcrossAllSinks(LogLevel) | Changes LogLevel for all sinks in the logger. No need to call UpdateMinimalLogLevelAcrossAllSinks() after this. Update will take effect only after logger's update because of async nature of the logging. So if you want to do the change synchronously - please call FlushAll()> |
UpdateMinimalLogLevelAcrossAllSinks() | Method that updates internal cached MinimalLogLevelAcrossAllSinks, and HasNoSinks please call it if you update sink's MinimalLogLevel or add/remove sinks Update will take effect only after logger's update because of async nature of the logging. So if you want to do the change synchronously - please call FlushAll()> |