You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to be able to log using multiple printers, for instance if I want to use the flutter printer to log to dart devtools, but also use the pretty printer to log in the terminal.
The text was updated successfully, but these errors were encountered:
Hey @chimon2000. You can extend LoggyPrinter to make your own printer for logging in any way you would want/need to. Here is simple example of custom multiple printer:
classMultiPrinterextendsLoggyPrinter{
MultiPrinter({
requiredthis.consolePrinter,
requiredthis.cloudPrinter,
requiredthis.filePrinter,
});
finalLoggyPrinter consolePrinter;
finalLoggyPrinter cloudPrinter;
finalLoggyPrinter filePrinter;
@overridevoidonLog(LogRecord record){
consolePrinter.onLog(record);
filePrinter.onLog(record);
// Log to cloud only if app is run in release modeif(kReleaseMode) {
cloudPrinter.onLog(record);
}
}
}
It would be nice to be able to log using multiple printers, for instance if I want to use the flutter printer to log to dart devtools, but also use the pretty printer to log in the terminal.
The text was updated successfully, but these errors were encountered: