Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Support for placeholders and structured logging in Epi

$
0
0

Hi,

I have a log setup in EpiServer using EPi.Libraries.Logging.Serilog and I was trying to integrate it with Logstash / ElasticSearch and Kibana.  But unfortunately the ILogger interface provided by Epi (EPiServer.Logging) doesn't support the use of placeholders in the lLog method, and therefore the LoggerExtensions class (EPiServer.Logging.LoggerExtensions) doesn't support the placeholders in the logging methods (information, error, etc). 

By Placeholders I mean:

_logger.Information("This is a {test}", "my input to logstash"). 

It doesn't support '{test}' , which would make me have fields/properties in the generated json sent to logstash.

Any ideas of workaround or any implementation that could make this work?

Thanks in advance!

 


Viewing all articles
Browse latest Browse all 9076

Trending Articles