LoggerOptions class
Configuration options for the logging transformer.
This class allows fine-grained control over what information is logged during API requests and responses.
Constructors
-
LoggerOptions.new({bool request = true, bool requestBody = true, bool responseBody = true, bool error = true, bool stackTrace = true, void logPrint(String message) = print, List<
APIMethod> methods = APIMethod.values, bool prettyPrint = true, bool colorOutput = true}) -
Creates logging configuration options.
const
-
LoggerOptions.detailed({void logPrint(String message) = print, List<
APIMethod> methods = APIMethod.values, bool colorOutput = true}) -
Creates detailed logging options (all information enabled).
const
-
LoggerOptions.errorsOnly({void logPrint(String message) = print, List<
APIMethod> methods = APIMethod.values, bool colorOutput = true}) -
Creates error-only logging options.
const
-
LoggerOptions.minimal({void logPrint(String message) = print, List<
APIMethod> methods = APIMethod.values, bool colorOutput = true}) -
Creates minimal logging options (only basic request/response info).
const
-
LoggerOptions.production({void logPrint(String message) = print, List<
APIMethod> methods = APIMethod.values, bool colorOutput = false}) -
Creates production-safe logging options (no sensitive data).
const
Properties
- colorOutput → bool
-
Whether to use colored output in console.
final
- error → bool
-
Whether to log error information.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- logPrint → void Function(String message)
-
Custom log printing function. Defaults to print.
final
-
methods
→ List<
APIMethod> -
List of API methods to log. If empty, all methods are logged.
final
- prettyPrint → bool
-
Whether to pretty print JSON data with indentation.
final
- request → bool
-
Whether to log basic request information (method name, timestamp).
final
- requestBody → bool
-
Whether to log request body (parameters and files).
final
- responseBody → bool
-
Whether to log response body data.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → bool
-
Whether to log error stack traces.
final
Methods
-
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