appflowy-editor/test/new/util/log_util.dart

22 lines
441 B
Dart
Raw Permalink Normal View History

2023-04-26 14:57:18 +08:00
import 'package:appflowy_editor/appflowy_editor.dart';
import 'package:flutter/material.dart';
const bool _enableLog = false;
2023-04-26 14:57:18 +08:00
void activateLog() {
if (!_enableLog) {
return;
}
AppFlowyLogConfiguration()
2023-04-26 14:57:18 +08:00
..handler = debugPrint
..level = AppFlowyEditorLogLevel.all;
2023-04-26 14:57:18 +08:00
}
void deactivateLog() {
if (!_enableLog) {
return;
}
AppFlowyLogConfiguration()
2023-04-26 14:57:18 +08:00
..handler = null
..level = AppFlowyEditorLogLevel.off;
2023-04-26 14:57:18 +08:00
}