Exemplo n.º 1
0
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            pipelines.EnableSerilog();

            Log.Logger = new LoggerConfiguration()
                         .WriteTo.Console()
                         .WriteTo.Console(new JsonFormatter())
                         .CreateLogger();
        }
Exemplo n.º 2
0
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            pipelines.EnableSerilog();

            var logger = new LoggerConfiguration()
                         .ReadFrom.AppSettings()
                         .CreateLogger();

            //Init loger
            Log.Logger = logger;
        }
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            base.ApplicationStartup(container, pipelines);

            pipelines.EnableSerilog();

            Log.Logger = new LoggerConfiguration()
                         .WriteTo.File(new JsonFormatter(), "log.txt")
                         .MinimumLevel.Debug()
                         .CreateLogger();

            if (settings.Cache.CacheEnabled)
            {
                this.EnableRapidCache(container.Resolve <IRouteResolver>(), ApplicationPipelines, new[] { "query", "form", "accept" });
                pipelines.AfterRequest.AddItemToStartOfPipeline(ConfigureCache);
            }
        }
Exemplo n.º 4
0
 protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
 {
     pipelines.EnableSerilog();
 }
Exemplo n.º 5
0
        protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
        {
            pipelines.EnableSerilog();

            StaticConfiguration.DisableErrorTraces = false;
        }