AccessLog class final

Reports every served request to onRecord.

Nothing is printed: what a log line looks like, and where it goes, is the application's decision.

final app = Router()
  ..layer(const RequestId())
  ..layer(AccessLog(logger.info));
Implemented types

Constructors

AccessLog(void onRecord(AccessRecord record))
Reports each request to onRecord.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
onRecord → void Function(AccessRecord record)
Called once per request, after the response is chosen.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMiddleware() Middleware
Builds the shelf middleware this value configures.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited