| Index: lib/src/handlers/logger.dart
|
| diff --git a/lib/src/handlers/logger.dart b/lib/src/handlers/logger.dart
|
| index 9f76f6c91f577cdc41028c1783ad8316eb76fa2c..98866d56c2c9f07c249aac37acffdb5dd3b9cb7f 100644
|
| --- a/lib/src/handlers/logger.dart
|
| +++ b/lib/src/handlers/logger.dart
|
| @@ -12,15 +12,13 @@ import '../middleware.dart';
|
| /// Middleware which prints the time of the request, the elapsed time for the
|
| /// inner handlers, the response's status code and the request URI.
|
| ///
|
| -/// [logger] takes two parameters.
|
| +/// If [logger] is passed, it's called for each request. The `msg` parameter is
|
| +/// a formatted string that includes the request time, duration, request method,
|
| +/// and requested path. When an exception is thrown, it also includes the
|
| +/// exception's string and stack trace; otherwise, it includes the status code.
|
| +/// The `isError` parameter indicates whether the message is caused by an error.
|
| ///
|
| -/// `msg` includes the request time, duration, request method, and requested
|
| -/// path.
|
| -///
|
| -/// For successful requests, `msg` also includes the status code.
|
| -///
|
| -/// When an error is thrown, `isError` is true and `msg` contains the error
|
| -/// description and stack trace.
|
| +/// If [logger] is not passed, the message is just passed to [print].
|
| Middleware logRequests({void logger(String msg, bool isError)}) =>
|
| (innerHandler) {
|
| if (logger == null) logger = _defaultLogger;
|
|
|