QLogger.createOutputToFile constructor
Implementation
factory QLogger.createOutputToFile(String? name, {String? filePath}) {
var logger = QLogger(name ?? 'Log', filePath);
var fOutput = FileOutput(file: File(logger.filePath!));
fOutput.init();
var w = LogStreamWriter();
Logger.writer = w;
w.messages.listen((LogMessage message) {
fOutput.output('${message.timestamp} | ${message.message}');
});
return logger;
}