From 70f95c06a3fbbb6600a4d725678aa11979d05ffb Mon Sep 17 00:00:00 2001 From: wanggang <76527413@qq.com> Date: Tue, 26 Nov 2019 15:25:23 +0800 Subject: [PATCH] 1.0.0-rc.106 Former-commit-id: bf7728561725b5b2e1405d471ae6ecd9c232e4ae --- projects/Infrastructure/Data/EfDbContext.cs | 4 ++-- projects/IoTCenter/appsettings.json | 2 +- projects/IoTClient/Assets/StreamingAssets/wwwroot/js/page.js | 2 +- projects/IoTClient/iotclient.apk.REMOVED.git-id | 2 +- projects/IoTNode/DeviceServices/Onvif/OnvifService.cs | 2 +- projects/IoTNode/Program.cs | 1 + projects/IoTNode/Startup.cs | 4 ++-- projects/IoTNode/appsettings.json | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/projects/Infrastructure/Data/EfDbContext.cs b/projects/Infrastructure/Data/EfDbContext.cs index 728353c0..74427281 100644 --- a/projects/Infrastructure/Data/EfDbContext.cs +++ b/projects/Infrastructure/Data/EfDbContext.cs @@ -16,7 +16,7 @@ namespace Infrastructure.Data { public static readonly ILoggerFactory DebugLogFactory = LoggerFactory.Create(builder => { - //builder.AddConsole(); + builder.AddConsole(); }); public static readonly ILoggerFactory ProductLogFactory = LoggerFactory.Create(builder => @@ -34,7 +34,7 @@ namespace Infrastructure.Data protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - if (this._env.IsDevelopment()) + if (this._cfg.GetValue("debug", false)) { optionsBuilder?.UseLoggerFactory(DebugLogFactory); } diff --git a/projects/IoTCenter/appsettings.json b/projects/IoTCenter/appsettings.json index 755c661a..8a5e10f8 100644 --- a/projects/IoTCenter/appsettings.json +++ b/projects/IoTCenter/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-rc.105", + "version": "1.0.0-rc.106", "Logging": { "LogLevel": { "Default": "Warning", diff --git a/projects/IoTClient/Assets/StreamingAssets/wwwroot/js/page.js b/projects/IoTClient/Assets/StreamingAssets/wwwroot/js/page.js index a183fb60..93dadc7d 100644 --- a/projects/IoTClient/Assets/StreamingAssets/wwwroot/js/page.js +++ b/projects/IoTClient/Assets/StreamingAssets/wwwroot/js/page.js @@ -1,5 +1,5 @@ // -var version = '1.0.0-rc.105'; +var version = '1.0.0-rc.106'; var isDebug = isDebug || false; var useSignalR = useSignalR || false; var isApp = location.href.indexOf('http') !== 0; diff --git a/projects/IoTClient/iotclient.apk.REMOVED.git-id b/projects/IoTClient/iotclient.apk.REMOVED.git-id index 65b1d464..4ba919a0 100644 --- a/projects/IoTClient/iotclient.apk.REMOVED.git-id +++ b/projects/IoTClient/iotclient.apk.REMOVED.git-id @@ -1 +1 @@ -db18615540b78f52eae016df7a574ae5a1b6f934 \ No newline at end of file +f0320fb226b6c4399d3bf2b7631fe835b0fb98bd \ No newline at end of file diff --git a/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs b/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs index dc796c07..560afe85 100644 --- a/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs +++ b/projects/IoTNode/DeviceServices/Onvif/OnvifService.cs @@ -396,7 +396,7 @@ namespace IoTNode.DeviceServices.Onvif { if (!string.IsNullOrEmpty(e.Data)) { - if (this._env.IsDevelopment()) + if (this._cfg.GetValue("debug", false)) { Console.WriteLine(e.Data); } diff --git a/projects/IoTNode/Program.cs b/projects/IoTNode/Program.cs index 6e4792ea..8e2fd290 100644 --- a/projects/IoTNode/Program.cs +++ b/projects/IoTNode/Program.cs @@ -46,6 +46,7 @@ namespace IoTNode new EFConfigurationValue { Id = "fbee.writelist", Value=""}, new EFConfigurationValue { Id = "camera.writelist", Value=""}, // + new EFConfigurationValue { Id = "debug", Value= "false"}, new EFConfigurationValue { Id = "name", Value= "物联网节点"}, new EFConfigurationValue { Id = "logo", Value= "/images/logo.png",Type= InputType.ImageUrl}, new EFConfigurationValue { Id = "copyright", Value= "Copyright © {now} Company. All rights reserved",Type= InputType.Html} diff --git a/projects/IoTNode/Startup.cs b/projects/IoTNode/Startup.cs index 1ef73acd..def3ac29 100644 --- a/projects/IoTNode/Startup.cs +++ b/projects/IoTNode/Startup.cs @@ -31,11 +31,11 @@ namespace IoTNode services.AddTransient(); services.AddTransient(); services.AddSingleton(); - //services.AddSingleton(); + services.AddSingleton(); services.AddSingleton(); //services.AddSingleton(); services.AddHostedService(o => o.GetService()); - //services.AddHostedService(o => o.GetService()); + services.AddHostedService(o => o.GetService()); services.AddHostedService(o => o.GetService()); //services.AddHostedService(o => o.GetService()); base.ConfigureServices(services); diff --git a/projects/IoTNode/appsettings.json b/projects/IoTNode/appsettings.json index db31e1fa..b39b8efc 100644 --- a/projects/IoTNode/appsettings.json +++ b/projects/IoTNode/appsettings.json @@ -1,5 +1,5 @@ { - "version": "1.0.0-rc.105", + "version": "1.0.0-rc.106", "Logging": { "LogLevel": { "Default": "Warning",