Esempio n. 1
0
        public override void SetUp(string suiteName, Assembly testAssembly, IEditableGroboTestContext suiteContext)
        {
            var settings = new BaseServiceSettings(suiteContext.Container.Get <IApplicationSettings>());

            SerilogConfigurator.ConfigureDefault(settings.LogDirectory);
            suiteContext.Container.Configurator.ForAbstraction <ILogger>().UseInstances(Log.Logger);
        }
Esempio n. 2
0
        public static HostConfigurator UseLogging(this HostConfigurator hostConfigurator, IApplicationSettings applicationSettings)
        {
            var settings = new BaseServiceSettings(applicationSettings);

            SerilogConfigurator.ConfigureDefault(settings.LogDirectory);
            hostConfigurator.UseSerilog();
            return(hostConfigurator);
        }