I have been playing about with Orchard trying to override an interface that isn't an IDependency but have not been able to get it to work. Is this even possible? I have been reading that there was a "low-level" autofac module hack used to override
dependencies before the OrchardSuppressDependency attribute was introduced, but cannot find any examples or details about the hack.
More specifically, I am trying to override the OrchardLog4NetFactory (ILoggerFactory) and OrchardLog4netLogger (ILogger) as I want to write log entries to the database but do not want the connection string in the log4net.config file (rather I want to
use content parts to store it in Orchard - this much I have managed, I just cannot retrieve it).
This is what I have tried:
1. Writing a custom appender for log4net - cannot retrieve connection string from Orchard as unable to resolve dependencies in this code
2. Custom appender that inherits from IShim to try and resolve the dependencies - seems to be totally incompatible with log4net
3. Creating an AutoFac module to register my own ILoggerFactory in the Load method - Orchard still uses the CastleLogger and OrchardLog4NetFactory registered in the Orchard LoggingModule
Can anyone provide more information on the so called "low-level" hack which might get this to work?