Class LoggerConfig
Configuration for Logger. Can be used to setup Logger and create it.
Inherited Members
Namespace: Unity.Logging
Assembly: Unity.Logging.dll
Syntax
public class LoggerConfig
Constructors
LoggerConfig()
Create Logger
Declaration
public LoggerConfig()
Fields
MinimumLevel
Declaration
public readonly LoggerMinimumLevelConfig MinimumLevel
Field Value
Type | Description |
---|---|
Logger |
SyncMode
Declaration
public readonly LoggerSyncModeConfig SyncMode
Field Value
Type | Description |
---|---|
Logger |
Properties
WriteTo
Use this method to add new Sink
Declaration
public LoggerWriterConfig WriteTo { get; }
Property Value
Type | Description |
---|---|
Logger |
Methods
CaptureStacktrace(bool)
Should this logger capture stacktraces
Declaration
public LoggerConfig CaptureStacktrace(bool capture = true)
Parameters
Type | Name | Description |
---|---|---|
bool | capture | True if it should capture stacktraces |
Returns
Type | Description |
---|---|
Logger |
Config to continue methods chain |
CreateLogger()
Call that creates Logger using default Log
Declaration
public Logger CreateLogger()
Returns
CreateLogger(LogMemoryManagerParameters)
Call that creates Logger
Declaration
public Logger CreateLogger(LogMemoryManagerParameters logMemoryManagerParameters)
Parameters
Type | Name | Description |
---|---|---|
Log |
logMemoryManagerParameters | Log |
Returns
GetCaptureStacktrace()
Returns current capture stacktrace state.
Declaration
public bool GetCaptureStacktrace()
Returns
Type | Description |
---|---|
bool | True is current state is to capture stacktraces |
GetOutputTemplate()
Returns current template that is used. See also Output
Declaration
public FixedString512Bytes GetOutputTemplate()
Returns
Type | Description |
---|---|
Fixed |
Current template that is used |
GetRedirectUnityLogs()
Returns current log startup state.
Declaration
public bool GetRedirectUnityLogs()
Returns
Type | Description |
---|---|
bool | True is current state is to log startup logs |
OutputTemplate(FixedString512Bytes)
Template that should be used by sinks by default. All sinks without explicit OutputTemplate will use this one after this call.
Declaration
public LoggerConfig OutputTemplate(FixedString512Bytes newTemplate)
Parameters
Type | Name | Description |
---|---|---|
Fixed |
newTemplate | Template for the messages. Can use any strings and , , as special holes. |
Returns
Type | Description |
---|---|
Logger |
Config to continue methods chain |
RedirectUnityLogs(bool)
Should this logger redirect Unity logs
Declaration
public LoggerConfig RedirectUnityLogs(bool log = true)
Parameters
Type | Name | Description |
---|---|---|
bool | log | True if it should redirect Unity logs |
Returns
Type | Description |
---|---|
Logger |
Config to continue methods chain |