Logit class
Public API for logging from outside the plugin.
Use Logit.debug, Logit.info, Logit.error, and Logit.api to log messages and API calls.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
api(
{required String heading, required String content, required String method, required String url, required Map< String, dynamic> headers, dynamic body, int? statusCode, Duration? timings, int? memoryUsage}) → void - Logs an API request/response manually.
-
debug(
String heading, String content) → void - Logs a debug/info message.
-
error(
String heading, String content) → void - Logs an error message.
-
info(
String heading, String content) → void - Logs an info message.
-
init(
LoggerConfig config) → void - Initializes the logger. Call this in your app's main() or before using any logging.
-
initializeProviderContainer(
ProviderContainer container) → void - Initialize a provider container for service classes
-
wrapHttp(
[dynamic client]) → LoggerHttp - Wraps an http.Client to enable API logging.