LoggerOptions constructor
const
LoggerOptions({})
Creates logging configuration options.
By default, this constructor enables logging all parameters including
request
, requestBody
, responseBody
, error
, and stackTrace
.
Parameters:
request
: Print request information (method, timestamp, ID)requestBody
: Print request parameters and filesresponseBody
: Print response dataerror
: Print error messagesstackTrace
: Print error stack traceslogPrint
: Custom log printer; defaults to printmethods
: Specific methods to log; defaults to all methodsprettyPrint
: Whether to pretty print JSON response bodiescolorOutput
: Whether to use colored console output
Implementation
const LoggerOptions({
this.request = true,
this.requestBody = true,
this.responseBody = true,
this.error = true,
this.stackTrace = true,
this.logPrint = print,
this.methods = APIMethod.values,
this.prettyPrint = true,
this.colorOutput = true,
});