Class LoggerExt
Namespace: ArmoniK.Api.Common.Utils
Assembly: ArmoniK.Api.Common.dll
Convenience methods for logging
[PublicAPI]
public static class LoggerExt
Inheritance
Inherited Members
object.Equals(object), object.Equals(object, object), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object, object), object.ToString()
Methods
BeginNamedScope(ILogger, string, params (string, object)[])
Create a
public static IDisposable BeginNamedScope(this ILogger logger, string name, params (string, object)[] properties)
Parameters
logger ILogger
Logger that will produce logs
name string
Name of the scope
Properties to put in the scope
Returns
BeginPropertyScope(ILogger, params (string, object)[])
Create a
public static IDisposable BeginPropertyScope(this ILogger logger, params (string, object)[] properties)
Parameters
logger ILogger
Logger that will produce logs
Properties to put in the scope
Returns
LogFunction(ILogger, string, LogLevel, string, string, int)
Logs the entering and leaving of a function represented by a scope
public static IDisposable LogFunction(this ILogger logger, string id = "", LogLevel level = LogLevel.Trace, string functionName = "", string classFilePath = "", int line = 0)
Parameters
logger ILogger
Logger that will produce logs
id string
Id of the under laying scope
level LogLevel
Level of logs produced
functionName string
Name of the function, found automatically with annotation
classFilePath string
Path to the filename containing the function, found automatically with annotation
line int
Line of the function, found automatically with annotation