menu
dox_core package
documentation
middleware/log_middleware.dart
LogMiddleware class
LogMiddleware class
dark_mode
light_mode
LogMiddleware
class
Implemented types
IDoxMiddleware
Constructors
LogMiddleware
({
bool
?
enabled
,
Map
<
String
,
dynamic
>
filter
(
Map
<
String
,
dynamic
>
)?,
bool
withHeader
=
false
,
List
<
String
>
redact
=
defaultRedact
})
Properties
enabled
→
bool
?
false
turns the request logs off. Not set: follow the logger config (
LoggerConfig.enabled
and
level
). The logger config always wins.
final
filter
↔
Map
<
String
,
dynamic
>
Function
(
Map
<
String
,
dynamic
>
)
?
changes the line before it is logged. It can change
status
too, so with a
filter
the line is built for every request when the logger is on, also when
level
would hide
info
. The cost is one request copy. Without a
filter
that work is skipped.
getter/setter pair
hashCode
→
int
The hash code for this object.
no setter
inherited
redact
→
List
<
String
>
a body field or header whose name contains one of these (any case) is logged as
[REDACTED]
, so passwords and tokens stay out of logs.
final
runtimeType
→
Type
A representation of the runtime type of the object.
no setter
inherited
withHeader
→
bool
final
Methods
handle
(
IDoxRequest
req
)
→
IDoxRequest
override
noSuchMethod
(
Invocation
invocation
)
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString
(
)
→
String
A string representation of this object.
inherited
Operators
operator ==
(
Object
other
)
→
bool
The equality operator.
inherited
Constants
defaultRedact
→ const
List
<
String
>
dox_core package
documentation
middleware/log_middleware
LogMiddleware class
log_middleware library