Log token info

This commit is contained in:
Christoph Hagen 2022-09-05 19:28:44 +02:00
parent 2f0827a430
commit 5cc7782d4e

View File

@ -18,11 +18,13 @@ struct TokenStorage {
private mutating func loadTokensFromDisk() {
guard FileManager.default.fileExists(atPath: fileUrl.path) else {
log(info: "No tokens loaded")
return
}
do {
let data = try Data(contentsOf: fileUrl)
tokens = try BinaryDecoder().decode(from: data)
log(info: "\(tokens.count) tokens loaded")
} catch {
log(error: "Failed to read token file: \(error)")
}