增强应用程序异常处理机制,新增未处理异常日志记录功能,确保在启动和运行期间捕获并记录异常信息。同时,重构配置文件加载逻辑,支持用户目录覆盖默认配置,优化 SQLite 数据库连接字符串处理,确保在不同环境下的兼容性和稳定性。
This commit is contained in:
@@ -3,6 +3,7 @@ using System.Net.Http;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.Json;
|
||||
using YY.Admin.Core.Util;
|
||||
|
||||
namespace YY.Admin.Services.Service.Jeecg;
|
||||
|
||||
@@ -226,7 +227,8 @@ public class JeecgLoginLogReportService : IJeecgLoginLogReportService, IClientLo
|
||||
|
||||
private static string GetQueuePath()
|
||||
{
|
||||
return Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "AppSettings", "offline-scada-log-queue.jsonl");
|
||||
var dir = AppWritablePaths.EnsureDirectoryExists(AppWritablePaths.AccountSettingsRootDirectory);
|
||||
return Path.Combine(dir, "offline-scada-log-queue.jsonl");
|
||||
}
|
||||
|
||||
private static void EnsureQueueDir(string path)
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
using System.IO;
|
||||
using System.Text.Json;
|
||||
using YY.Admin.Core.Util;
|
||||
|
||||
namespace YY.Admin.Services.Service.Jeecg
|
||||
{
|
||||
/// <summary>
|
||||
/// 读写本地 Jeecg 同步状态文件(与 appsettings 同目录下的 Configuration)
|
||||
/// 读写本地 Jeecg 同步状态文件(用户可写目录,避免 Program Files 无写权限)。
|
||||
/// </summary>
|
||||
public class JeecgSyncStateStore
|
||||
{
|
||||
@@ -12,7 +13,7 @@ namespace YY.Admin.Services.Service.Jeecg
|
||||
|
||||
public JeecgSyncStateStore()
|
||||
{
|
||||
var dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configuration");
|
||||
var dir = AppWritablePaths.EnsureDirectoryExists(AppWritablePaths.ConfigurationDirectory);
|
||||
_filePath = Path.Combine(dir, "jeecg-sync-state.json");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user