Photomechanics API
ProxyLogger Class Reference

Wrapper around ILogger allowing to dynamically change it. Useful to update context of already injected loggers. More...

Inheritance diagram for ProxyLogger:
[legend]

Public Member Functions

 ProxyLogger (ILogger logger)
 Create proxy logger on top of provided logger. This logger can be changed later.
 
void ChangeSourceContext< T > (T value)
 Alias for updating underlying logger using SerilogExtensions.ForContextOf extension method. More...
 
void Write (LogEvent logEvent)
 

Properties

ILogger UnderlyingLogger [get, set]
 Proxied logger.
 

Detailed Description

Wrapper around ILogger allowing to dynamically change it. Useful to update context of already injected loggers.

Member Function Documentation

◆ ChangeSourceContext< T >()

void ProxyLogger.ChangeSourceContext< T > ( value)

Alias for updating underlying logger using SerilogExtensions.ForContextOf extension method.

Type Constraints
T :notnull