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.gitawait LogExport.initialize(
logFolderPath: 'path/to/log/files',
timezone: 'Asia/Seoul',
manageOldLogFiles: 7,
);logFolderPathis the path where the log file will be stored.timezoneis the timezone of the log file. If empty, the timezone will be use local timezone.manageOldLogFilesis 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.');