修改DeviceManager.cs中的日志功能实现
This commit is contained in:
@@ -375,10 +375,11 @@ namespace JoyD.Windows.CS.Toprie
|
||||
File.AppendAllText(logPath, $"[{DateTime.Now:yyyy-MM-dd HH:mm:ss.fff}] {message}\r\n");
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 如果写入日志文件失败,只输出到控制台
|
||||
Console.WriteLine($"日志写入失败: {ex.Message}");
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 如果写入日志文件失败,只输出到控制台
|
||||
Console.WriteLine($"日志写入失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user