Major improvements and bug fixes for v1.1.0
Features: - Add auto-enable on startup based on config - Add enabled state persistence in config.json - Add limitations notice in GUI menu - Simplify logging to single file (uskey.log) - Change "Open Logs Folder" to "Open Config Folder" Bug Fixes: - Fix GUI status display mismatch on startup - Fix first toggle click not working issue - Revert password field changes that caused key blocking UI Changes: - Add ⚠️ emoji to "About Limitations" menu item - Remove button action to fix menu refresh 🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
@@ -9,18 +9,11 @@ struct Logger {
|
||||
let logsDir = getLogsDirectory()
|
||||
try? FileManager.default.createDirectory(at: URL(fileURLWithPath: logsDir), withIntermediateDirectories: true)
|
||||
|
||||
let dateFormatter = DateFormatter()
|
||||
dateFormatter.dateFormat = "yyyy-MM-dd"
|
||||
let dateString = dateFormatter.string(from: Date())
|
||||
logFilePath = "\(logsDir)/uskey.log"
|
||||
|
||||
logFilePath = "\(logsDir)/uskey-\(dateString).log"
|
||||
|
||||
if !FileManager.default.fileExists(atPath: logFilePath!) {
|
||||
FileManager.default.createFile(atPath: logFilePath!, contents: nil)
|
||||
}
|
||||
FileManager.default.createFile(atPath: logFilePath!, contents: nil)
|
||||
|
||||
logFileHandle = FileHandle(forWritingAtPath: logFilePath!)
|
||||
logFileHandle?.seekToEndOfFile()
|
||||
|
||||
info("Logger initialized, log file: \(logFilePath!)")
|
||||
}
|
||||
@@ -82,4 +75,4 @@ struct Logger {
|
||||
static func cleanup() {
|
||||
logFileHandle?.closeFile()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user