aim_server_logger 0.0.1 copy "aim_server_logger: ^0.0.1" to clipboard
aim_server_logger: ^0.0.1 copied to clipboard

HTTP logging middleware for aim_server with request/response details and customizable output formats.

0.0.1 #

Initial release - HTTP logging middleware for Aim framework

Features #

  • Request logging with HTTP method and path
  • Response logging with status code and response time
  • Customizable onRequest callback for custom request logging
  • Customizable onResponse callback for custom response logging
  • Automatic response time measurement in milliseconds
  • Easy integration with custom logging systems

Examples #

import 'package:aim_server/aim_server.dart';
import 'package:aim_server_logger/aim_server_logger.dart';

final app = Aim();

// Basic logging
app.use(logger());

// Custom callbacks
app.use(logger(
  onRequest: (c) async {
    print('Incoming: ${c.req.method} ${c.req.uri.path}');
  },
  onResponse: (c, durationMs) async {
    print('Outgoing: ${c.response?.statusCode} (${durationMs}ms)');
  },
));
0
likes
160
points
0
downloads

Publisher

verified publisheraim-dart.dev

Weekly Downloads

HTTP logging middleware for aim_server with request/response details and customizable output formats.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

aim_server

More

Packages that depend on aim_server_logger