aim_server_logger 0.0.1
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
onRequestcallback for custom request logging - Customizable
onResponsecallback 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)');
},
));