LoggingMiddleware<State> constructor

LoggingMiddleware<State>({
  1. Logger? logger,
  2. Level level = Level.INFO,
  3. MessageFormatter<State> formatter = singleLineFormatter,
})

The default constructor. It will only log actions to the given Logger, but it will not print to the console or anything else.

Implementation

LoggingMiddleware({
  Logger? logger,
  this.level = Level.INFO,
  this.formatter = singleLineFormatter,
}) : logger = logger ?? Logger('LoggingMiddleware');