Joutsen Logging v0.5.0+26-g72240ac
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Joutsen.Logging.LoggerChildScopeExtensions Class Reference

Extension methods for loggers that allow the easy creation of loggers that log records as children of a specified parent record. More...

Static Public Member Functions

static Logger StartChildScope (this Logger logger, Guid parentId)
 Creates a new child scoped logger that uses a specific parent id.
 
static Logger StartChildScope (this Logger logger, Guid parentId, Scope childScope)
 Creates a new child scoped logger that uses a specific parent id and a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogRecord parentRecord, LogRecord endRecord=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogRecord parentRecord, LogRecord endRecord=null)
 Creates a new child scoped logger that uses a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogLevel level, string parentMessage, string endMessage=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogLevel level, string parentMessage, string endMessage=null)
 Creates a new child scoped logger that uses a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogLevel level, string parentMessage, object[] parameters, string endMessage=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogLevel level, string parentMessage, object[] parameters, string endMessage=null)
 Creates a new child scoped logger that uses a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogLevel level, string parentMessage, Map< string, object > parameters, string endMessage=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogLevel level, string parentMessage, Map< string, object > parameters, string endMessage=null)
 Creates a new child scoped logger that uses a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogLevel level, string parentMessage, object parameter, string endMessage=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogLevel level, string parentMessage, object parameter, string endMessage=null)
 Creates a new child scoped logger that uses a specific child scope.
 
static Logger StartChildScope (this Logger logger, LogLevel level, string parentMessage, IEnumerable listParameter, string endMessage=null)
 Creates a new child scoped logger.
 
static Logger StartChildScope (this Logger logger, Scope childScope, LogLevel level, string parentMessage, IEnumerable listParameter, string endMessage=null)
 Creates a new child scoped logger that uses a specific child scope.
 

Detailed Description

Extension methods for loggers that allow the easy creation of loggers that log records as children of a specified parent record.

Since
Unreleased

Member Function Documentation

◆ StartChildScope() [1/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Guid  parentId 
)
static

Creates a new child scoped logger that uses a specific parent id.

Parameters
loggerthe logger to call this mehtod on
parentIdthe specific id of a parent record to use
Returns
a logger that handles logging the child records

◆ StartChildScope() [2/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Guid  parentId,
Scope  childScope 
)
static

Creates a new child scoped logger that uses a specific parent id and a specific child scope.

Parameters
loggerthe logger to call this mehtod on
parentIdthe specific id of a parent record to use
childScopethe scope to use for the children
Returns
a logger that handles logging the child records

◆ StartChildScope() [3/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogLevel  level,
string  parentMessage,
IEnumerable  listParameter,
string  endMessage = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
listParameterthe list parameter to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [4/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogLevel  level,
string  parentMessage,
Map< string, object >  parameters,
string  endMessage = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parametersthe named parameters object to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [5/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogLevel  level,
string  parentMessage,
object  parameter,
string  endMessage = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parameterthe parameter object to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [6/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogLevel  level,
string  parentMessage,
object[]  parameters,
string  endMessage = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parametersthe positional parameters object to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [7/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogLevel  level,
string  parentMessage,
string  endMessage = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [8/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
LogRecord  parentRecord,
LogRecord  endRecord = null 
)
static

Creates a new child scoped logger.

Parameters
loggerthe logger to call this mehtod on
parentRecordthe record to use a as the parent of all records in the new scope
endRecorda record that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [9/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogLevel  level,
string  parentMessage,
IEnumerable  listParameter,
string  endMessage = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
listParameterthe list parameter to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [10/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogLevel  level,
string  parentMessage,
Map< string, object >  parameters,
string  endMessage = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parametersthe named parameters to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [11/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogLevel  level,
string  parentMessage,
object  parameter,
string  endMessage = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parameterthe parameter object to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [12/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogLevel  level,
string  parentMessage,
object[]  parameters,
string  endMessage = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
parametersthe positional parameters to use in the parentMessage
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [13/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogLevel  level,
string  parentMessage,
string  endMessage = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
levelthe log level of the parent and end messages
parentMessagethe message to use a as the parent of all records in the new scope
endMessagea messgae that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records

◆ StartChildScope() [14/14]

static Logger Joutsen.Logging.LoggerChildScopeExtensions.StartChildScope ( this Logger  logger,
Scope  childScope,
LogRecord  parentRecord,
LogRecord  endRecord = null 
)
static

Creates a new child scoped logger that uses a specific child scope.

Parameters
loggerthe logger to call this mehtod on
childScopethe scope to use for the children
parentRecordthe record to use a as the parent of all records in the new scope
endRecorda record that will be logged when the child scope ends and the child logger is disposed
Returns
a logger that handles logging the child records