コード例 #1
0
        static Startup()
        {
            Log.Logger = new LoggerConfiguration()
                         .MinimumLevel.Information()
//                .WriteTo.Elasticsearch(new ElasticsearchSinkOptions(new Uri("http://elasticsearch:9200")) {
//                    AutoRegisterTemplate = true,
//                    AutoRegisterTemplateVersion = AutoRegisterTemplateVersion.ESv6,
//                    CustomFormatter = new ExceptionAsObjectJsonFormatter(renderMessage: true)
//                })
                         .WriteTo.Console()
                         .CreateLogger();

            DbStaticInitializer.SetupDb();
            var dbHelper = new FullShareDbHelper();

            dbHelper.Migrate();

            Grim.ReapAndStart();
        }
コード例 #2
0
 public UploadController(FullShareDbHelper dbHelper)
 {
     _dbHelper = dbHelper;
 }