mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-24 02:33:44 +03:00
Merge PR #121.
This commit is contained in:
commit
f52e47d249
@ -92,12 +92,18 @@ class RpcSession {
|
||||
static void _logEntry(String entry) {
|
||||
try {
|
||||
final record = jsonDecode(entry);
|
||||
Logger('helper.${record['name']}').log(
|
||||
_py2level[record['level']] ?? Level.INFO,
|
||||
record['message'],
|
||||
record['exc_text'],
|
||||
//time: DateTime.fromMillisecondsSinceEpoch(event['time'] * 1000),
|
||||
);
|
||||
var entryLevel = _py2level[record['level']];
|
||||
if (entryLevel == null) {
|
||||
Logger('helper.${record['name']}')
|
||||
.log(Levels.ERROR, 'Invalid log level: ${record['level']}');
|
||||
} else {
|
||||
Logger('helper.${record['name']}').log(
|
||||
entryLevel,
|
||||
record['message'],
|
||||
record['exc_text'],
|
||||
//time: DateTime.fromMillisecondsSinceEpoch(event['time'] * 1000),
|
||||
);
|
||||
}
|
||||
} catch (e) {
|
||||
_log.error(e.toString(), entry);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user