jstemerdink / epi.libraries.logging.serilog Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Hi,
I tried today to use log with placeholders (or structured logging as well) in EpiServer Serilog and I figured it doesn't support it. Sorry if I am posting this in the wrong place, but I was wondering if there's anything to make it support placeholders. I need it for having new fields in the json which is generated and sent to logstash/kibana.
By placeholders I mean something like this:
string test = "message";
logger.Information("{test}", message);
There's no Information (or Error, Debug) method accepting this kind of property.
Thanks in advance and sorry if I'm posting this in the incorrect place.
When using EPiServer 10.10.0 (or maybe even earlier versions) the LoggerFactory will not remain set on the EPiServer.Logging.LogManager. When resolving the EPiServer.Logging.ILogger it will now resolve the EPiServerLazyLogger. However, when registering it using the appsettings or loggerFactoryType attribute on the episerver.framework section it does work.
<appSettings>
<add key="episerver:LoggerFactoryType" value="EPi.Libraries.Logging.Serilog.SeriLoggerFactory, EPi.Libraries.Logging.Serilog" />
</appSettings>
or
<episerver.framework loggerFactoryType="EPi.Libraries.Logging.Serilog.SeriLoggerFactory, EPi.Libraries.Logging.Serilog">
I propose a change to remove the SeriLoggerFactory registeration with the EPiServer.Logging.LogManager from the InitializableModule and update the documentation to register the SeriLoggerFactory using the configuration as stated above.
Will make PR when I have the time (probably this weekend or so).
Hi, jstemerdink,
I have the following cases:
I would like to use Serilog and JSON format with your libraries in my project. Could you tell me please what can I do to achieve my aim?
Thank you very much!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.