We want to use a common logging library for ASP.Net Core web applications, Azure Functions and Web Services. NLog seems like a good option since it has multiple targets e.g. Application Insights and Azure Table Storage. Ideally, I'd like to do something like call CommonTrace(message) and have that function
(1) track other information such as (a) Environment - DEV, TEST, PROD; (b) the local time, (c) System.Runtime.CompilerServices.CallerLineNumber (d) calling application etc.
(2) Call NLog to write out the message and other information. Note the other information may be prepended to the message or persisted in some other way.
But as I learn more about NLog and ASP.NET Core, it seems that if one naively creates a basic wrapper class to add additional information, one could lose out on a lot of features e.g. accessing the callsite and header information that NLog and Microsoft.Extensions.Logging provides.
So, is it possible to subclass NLog entirely and then use that wrapper as one would normally use NLog with ASP.Net Core. Or is there a better way to add common information from multiple applications when using NLog?