public WatchmanBot(DiscordConfiguration configuration, IComponentContext context = null) { this._configuration = configuration; this._context = context ?? this.GetAutofacContainer(configuration).Resolve <IComponentContext>(); Log.Logger = SerilogInitializer.Initialize(this._context.Resolve <IMongoDatabase>()); Log.Information("Bot created..."); }
static Program() { SerilogInitializer.Register(); log = Serilog.Log.ForContext <Program>(); }