Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Scenario is so:
Current ctor implementation looks like the below. Using ILog in place of the update to ILogger works, ILogger results in a null param value:
public MyConstructor([LogName("MyCustomLogName")] ILogger logger)
_logger = logger;
The Autofac logging module is based on this one https://autofaccn.readthedocs.io/en/latest/examples/log4net.html but rather than logging based on the component type, it uses LogManager to get the log by the name provided as the attribute param. ILog exposes
The existing Umbraco Logging service doesn't expose any method for getting/setting the log file, and doesn't appear to have any internals to do so either.
On poking around a bit, if I grab the ILogger property, CanWrite is false (true on ILog property types), so I can't call SetValue on the property to set the logger. At least, that's my read on the situation...
Has anyone done similar or have an alternative solution?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted