mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-01-23 01:14:24 +01:00
fix(log): Logging System Improvements and Error Handling Enhancements (#994)
* fix: Added logging to exception handling Added detailed error logging to exception handling across multiple files, including exception information and stack traces, to facilitate troubleshooting. * refactor(logging): Standardize logging output methods Replace existing debugPrint and lprint with Loggers.app.warning to enhance logging consistency and maintainability. * refactor: Remove redundant debug log prints Clean up unnecessary log print statements in debug code * feat(i18n): Added internationalization support for the logging feature
This commit is contained in:
@@ -164,7 +164,8 @@ class NetSpeed extends TimeSeq<NetSpeedPart> {
|
||||
final bytesIn = BigInt.parse(bytes.first);
|
||||
final bytesOut = BigInt.parse(bytes[8]);
|
||||
results.add(NetSpeedPart(device, bytesIn, bytesOut, time));
|
||||
} catch (_) {
|
||||
} catch (e, s) {
|
||||
Loggers.app.warning('Failed to parse net speed data: $item', e, s);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -679,7 +679,7 @@ void _parseWindowsTemperatures(Temperatures temps, String raw) {
|
||||
if (typeLines.isNotEmpty && valueLines.isNotEmpty) {
|
||||
temps.parse(typeLines.join('\n'), valueLines.join('\n'));
|
||||
}
|
||||
} catch (e) {
|
||||
// If JSON parsing fails, ignore temperature data
|
||||
} catch (e, s) {
|
||||
Loggers.app.warning('Failed to parse Windows temperature data', e, s);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user