Injecting a new Logger

Topics: Core, General, Writing modules
Developer
Jan 4, 2012 at 5:18 PM

Hey Yo,

Anyone know how I can swap out one logger for another using Autofac?

Cheers, Nick

Jan 4, 2012 at 5:59 PM

Have you tried OrchardSuppressDependency to suppress the old one? ...I know logger injection works a bit differently to other dependencies so not sure otherwise...

Developer
Jan 4, 2012 at 6:44 PM

Hey Pete.. So lets say I dont have access to OrchardSuppressDependency... How else could I do it?

I assume I would need an Autofac Module... but how do I do it?

Developer
Jan 4, 2012 at 8:29 PM

I was looging at this from the wrong angle. I needed an appender not a logger. :) Will update tomorrow to let you know how it goes.