Logger UI is a tools that can be used to trace sequential proccess that hard to trace with traditional approach, while maintain the debugging proccess inflight.
Before using the Logger UI, you need to know that Logger UI working with 3rd package such as sqflite for the database
Initialize the Logger UI, because depend on sqflite. Make sure to initiate the WidgetsFlutterBinding.ensureInitialized(); first.
void main() {
runApp(const MyApp());
WidgetsFlutterBinding.ensureInitialized();
LoggerUi().initialize();
}// initialize instance
final loggerUi = LoggerUI();
// create log trought the repository
loggerUi.createLog(
Log(
title: 'Warning',
type: LogType.warning,
flags: 'auth,http_call,ble',
createdAt: DateTime.now().millisecondsSinceEpoch,
),
);LoggerStreamManager.stream;Retrieve the stream from LoggerStreamManager singleton, it will send a int data whenever the Log is created.
LogType (enum)
- info
- warning
- success
- error
PayloadType (enum)
- text
- list
Payload
- Text, Self explanatory just write any text to it.
- List, List of
PayloadObject- String label
- String? value
Flags (String) singular or multiple, separated by comma ,
example : http_call,auth,user
Navigate straight to the page
Navigator.push(
context,
MaterialPageRoute(builder: (context) => LoggerListPage()),
);Feel free to contribute, straight away to the logger_ui.