LoggingPlugin<CTX extends Context> class
A comprehensive logging plugin for Telegram Bot API requests.
Provides detailed, configurable logs of API calls with timing information, request/response data, headers, and error details. Perfect for development, debugging, and production monitoring.
Example usage:
final bot = Bot('TOKEN');
bot.plugn(LoggingPlugin(
options: LoggerOptions(
requestBody: true,
responseBody: true,
prettyPrint: true,
colorOutput: true,
),
));
- Implemented types
-
- TransformerPlugin<
CTX>
- TransformerPlugin<
Constructors
- LoggingPlugin.new({LoggerOptions options = const LoggerOptions()})
-
Creates an instance of the Logger.
const
Properties
-
dependencies
→ List<
String> -
List of plugin names that this plugin depends on.
no setteroverride
- description → String?
-
Optional description of what this plugin does.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The unique name of this plugin.
no setteroverride
- options → LoggerOptions
-
The logging configuration options.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- transformer → Transformer
-
The transformer to install.
no setteroverride
- version → String
-
The version of this plugin.
no setteroverride
Methods
-
install(
Bot< CTX> bot) → void -
Installs the plugin on the given bot.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
Bot< Context> bot) → void -
Uninstalls the plugin from the given bot.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited