FlutterArtist Log Viewer
FlutterArtist LogViewer is a tool that allows users to review previously displayed application errors or warnings via SnackBar. This tool is beneficial for both end-users and developers.

The Logger system in FlutterArtist is more than just a logging tool; it acts as the application's "black box". Allowing end-users to access the LogViewer is a breakthrough step, significantly reducing communication time between support teams and users when issues arise. Instead of describing errors verbally, users can simply screenshot the LogViewer, complete with the full StackTrace and ErrorInfo.
- FlutterArtist Rest Debug Viewer
- FlutterArtist Debug Filter Model Viewer
- FlutterArtist Debug Form Model Viewer
- FlutterArtist Debug Filter Criteria Viewer
- FlutterArtist Debug Storage Viewer (***)
- FlutterArtist Code Flow Viewer
1. LogViewer
Once the application has at least one recorded Log entry, you can access this feature from the DebugMenu dropdown (typically located in the top-right corner of the application).


You can also open the LogViewer via code:
bool hasLogs = FlutterArtist.logger.hasLogEntries();
if(hasLogs) {
await FlutterArtist.showLogViewerDialog();
}No ADS
Note: By default, the Logger only stores up to 20 LogEntries; older LogEntries will be discarded. However, you can specify a different value using the FlutterArtist.config() method called in main.dart.main.dart (*)await FlutterArtist.config( maxStoredLogEntryCount: 20, ... );
- FlutterArtist config (***)
- FlutterArtist Starter (***)

recentErrorCount | The number of errors occurring since the last time the Log Viewer was opened. This value will be reset to 0 immediately after the user closes the Log Viewer Dialog. |
recentWarningCount | The number of warnings occurring since the last time the Log Viewer was opened. This value will be reset to 0 immediately after the user closes the Log Viewer Dialog. |
totalErrorCount | The total number of error occurrences |
totalWarningCount | The total number of warning occurrences. |
Accessing Log Info via Code
void printLogInfo() {
Logger logger = FlutterArtist.logger;
print("hasRecentLogEntries: ${logger.hasRecentLogEntries}");
print("recentErrorCount ${logger.recentErrorCount}");
print("recentWarningCount ${logger.recentWarningCount}");
print("totalErrorCount ${logger.totalErrorCount}");
print("totalWarningCount ${logger.totalWarningCount}");
for (LogEntry logEntry in logger.logEntries) {
// error, warning,..
print("logEntry.logEntryType: ${logEntry.logEntryType}");
if (logEntry.logEntryType == LogEntryType.error) {
ErrorInfo errorInfo = logEntry.errorInfo as ErrorInfo;
print("errorInfo.errorMessage: ${errorInfo.errorMessage}");
print("errorInfo.errorDetails: ${errorInfo.errorDetails}");
print("StackTrace:\n ${errorInfo.stackTrace}");
}
//
else if (logEntry.logEntryType == LogEntryType.warning) {
WarningInfo warningInfo = logEntry.warningInfo as WarningInfo;
print("warningInfo.errorMessage: ${warningInfo.warningMessage}");
}
}
}DebugMenu is a built-in class in the flutter_artist library that allows you to create a button. When the user clicks this button, a dropdown menu will appear containing various standard FlutterArtist debugging functions. This article guides you on how to add this menu to your application.
No ADS
FlutterArtist
- Basic concepts in Flutter Artist
- FlutterArtist Block ex1
- FlutterArtist Form ex1
- FlutterArtist FormModel.patchFormFields() Ex1
- FlutterArtist BlockQuickItemUpdateAction Ex1
- FlutterArtist BlockNumberPagination Ex1
- FlutterArtist BlockQuickMultiItemCreationAction Ex1
- FlutterArtist ListView Infinite Scroll Pagination Example
- FlutterArtist Pagination
- FlutterArtist Sort DropdownSortPanel Example
- FlutterArtist Dio
- FlutterArtist BackgroundWebDownloadAction ex1
- FlutterArtist Block External Shelf Event ex1
- FlutterArtist Master-detail Blocks ex1
- FlutterArtist Scalar ex1
- FlutterArtist Pagination Davi table Infinite Scroll Ex1
- FlutterArtist Filter FormBuilderField ex1
- FlutterArtist Form Parent-child MultiOptFormProp ex1
- FlutterArtist Manual Sorting ReorderableGridView Example
- FlutterArtist Manual Sorting ReorderableListView
- FlutterArtist Scalar External Shelf Event ex1
- FlutterArtist Log Viewer
- FlutterArtist DebugMenu
- FlutterArtist Context Provider Views
- FlutterArtist Internal Shelf Event ex1
- FlutterArtist Deferring External Shelf Events (Ex1)
- FlutterArtist DropdownSortPanel
Show More
