saveMessageList static method
Saves the message list to a file.
logFileName: The name of the file to save to.logger: The logger name (defaults to "Main").append: If true, appends to the file instead of overwriting.format: The save format (defaults to SaveFormat.text).clear: If true, clears the message list after saving.
Returns: A LogError indicating success or failure.
Implementation
static LogError saveMessageList(
{required String logFileName,
String logger = 'Main',
bool append = false,
bool flush = false,
SaveFormat format = SaveFormat.text,
bool clear = false}) {
return isCriticalMode
? LogError(-5, message: 'is in critical mode')
: loggerManager.saveMessageList(logFileName,
append: append,
logger: logger,
format: format,
flush: flush,
clear: clear);
}