INNER CODE UNIT · Dart
_bufferPreInit
aayush2622/Dartotsu · lib/logger.dart:104
static void _bufferPreInit(String log) {
if (_preInitBuffer.length >= _maxPreInitLogs) {
_preInitBuffer.removeAt(0);
}
_preInitBuffer.add(log);
}
static Future<void> _rotateLogs() async {
final backup = File('${_logFile.path}.old');
if (await backup.exists()) {
await backup.delete();
}
await _logFile.rename(backup.path);
await _logFile.create(recursive: true);
}
static const _levelStrings = {
LogLevel.debug: 'DEBUG',