dbettin / webapi.nlog Goto Github PK
View Code? Open in Web Editor NEWNLog TraceWriter implementation for Asp.Net WebApi
License: MIT License
NLog TraceWriter implementation for Asp.Net WebApi
License: MIT License
... as it conflicts with the released version of WebApi (and is legally questionable due to licensing issues...). Can you instead make the nuget package depend on Microsoft.AspNet.WebApi.Core.4.0 and above?
This project seems very useful, but there's not much documentation and no sample site to see how it's used in the real world.
I am finding that when I use webapi.nlog that all the trace records come out with timestamps in UTC not the local time zone. Is this intended?
If I use the standard logger.Trace, logger.Error methods in NLog they all come out with localtime (and are made with localtime timestamps).
I have "fixed" it in my copy by changing the CreateEvent method in NLogTraceWriter to read:
private LogEventInfo CreateEvent(TraceRecord record, LogLevel logLevel)
{
// create new log event info based off TraceRecord properties specified by app
var logEvent = new LogEventInfo
{
Level = logLevel,
Message = record.Message,
LoggerName = record.Category,
Exception = record.Exception,
TimeStamp = record.Timestamp.ToLocalTime()
};
// load properties on the log event, this will be used downstream by the layout renderers
PopulateProperties(record, logEvent);
return logEvent;
}
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.