LogExport is a Flutter plugin that exports log messages to a log file.
You must initialize LogExport before using it.
dependencies:
flutter:
sdk: flutter
log_export:
git:
url: https://github.com/scadasystems/Log-Export.git
await LogExport.initialize(
logFolderPath: 'path/to/log/files',
timezone: 'Asia/Seoul',
manageOldLogFiles: 7,
);
logFolderPath
is the path where the log file will be stored.timezone
is the timezone of the log file. If empty, the timezone will be use local timezone.manageOldLogFiles
is the number of log files to keep. If 0, all log files are kept.
Write log messages to the log file.
await LogExport.write('This is a log message.');