adept_log 1.0.1
adept_log: ^1.0.1 copied to clipboard
SmartLog is a Flutter logging utility that provides colored logs, multiple log levels, JSON-safe logging, tags, and stack trace support.
example/example.md
✨ How To Use #
✅ AdeptLog #
import 'package:smartlog/view/adept_log.dart';
// Simple logs
AdeptLog.d('App initialized', tag: 'BOOT');
AdeptLog.i({
'status': 'success',
'module': 'auth',
'userId': 1024,
'session': 'abc123xyz',
}, tag: 'LOGIN');
AdeptLog.s({
'message': 'Order synced successfully',
'orderId': 'ORD-78231',
'items': 5,
'durationMs': 342,
}, tag: 'SYNC');
// Error log with stack trace
AdeptLog.e(
{
'error': 'Invalid credentials',
'code': 401,
'endpoint': '/api/login',
},
tag: 'AUTH',
stackTrace: StackTrace.current,
);
// Large JSON / API logs
AdeptLog.d({
'url': '/api/v1/orders',
'method': 'POST',
'payload': {
'productId': 77,
'qty': 3,
'price': 1499,
},
}, tag: 'API-REQUEST');
AdeptLog.i({
'status': 200,
'message': 'Order list fetched successfully',
'timestamp': '2026-02-10T10:45:22Z',
'data': {
'pagination': {
'page': 1,
'pageSize': 10,
'totalRecords': 248,
'totalPages': 25,
},
'orders': [
{
'orderId': 'ORD-10021',
'customer': {
'id': 501,
'name': 'Rahul Sharma',
'mobile': '9XXXXXXXX1',
'address': {
'city': 'Delhi',
'state': 'Delhi',
'pincode': '110001',
},
},
'items': [
{'productId': 77, 'name': 'Milk Packet', 'qty': 3, 'price': 60},
{'productId': 88, 'name': 'Curd', 'qty': 2, 'price': 45},
],
'payment': {
'mode': 'UPI',
'transactionId': 'TXN998877',
'amount': 270,
'status': 'SUCCESS',
},
'delivery': {
'type': 'HOME_DELIVERY',
'scheduledAt': '2026-02-11 07:00 AM',
'status': 'PENDING',
},
},
],
},
}, tag: 'API-RESPONSE');
📸 AdeptLog #
