Log token info
This commit is contained in:
parent
2f0827a430
commit
5cc7782d4e
@ -18,11 +18,13 @@ struct TokenStorage {
|
|||||||
|
|
||||||
private mutating func loadTokensFromDisk() {
|
private mutating func loadTokensFromDisk() {
|
||||||
guard FileManager.default.fileExists(atPath: fileUrl.path) else {
|
guard FileManager.default.fileExists(atPath: fileUrl.path) else {
|
||||||
|
log(info: "No tokens loaded")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
let data = try Data(contentsOf: fileUrl)
|
let data = try Data(contentsOf: fileUrl)
|
||||||
tokens = try BinaryDecoder().decode(from: data)
|
tokens = try BinaryDecoder().decode(from: data)
|
||||||
|
log(info: "\(tokens.count) tokens loaded")
|
||||||
} catch {
|
} catch {
|
||||||
log(error: "Failed to read token file: \(error)")
|
log(error: "Failed to read token file: \(error)")
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user