critical_log 0.0.20 copy "critical_log: ^0.0.20" to clipboard
critical_log: ^0.0.20 copied to clipboard

A structured logging package for Dart and Flutter with support for critical and batch logging.

example/example.dart

import 'package:flutter/material.dart';
import 'package:critical_log/log.dart';

Future<void> main() async {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  final Logger logger = Logger(
      baseUrl: 'https://example.com',
      platformName: 'test-platform',
      user: "test-user",
      secret: 'your-secret',
      duration: 5,
      logCount: 3);

  MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('Log Example')),
        body: Center(
          child: ElevatedButton(
            onPressed: () {
              logger.storeLog(
                title: 'Test Log',
                message: 'This is a test log message.',
                level: LogLevel.info,
                enviroment: 'development',
              );
            },
            child: const Text('Log Message'),
          ),
        ),
      ),
    );
  }
}
2
likes
140
points
706
downloads

Publisher

unverified uploader

Weekly Downloads

A structured logging package for Dart and Flutter with support for critical and batch logging.

Repository

Documentation

API reference

License

MIT (license)

Dependencies

connectivity_plus, crypto, device_info_plus, dio, flutter

More

Packages that depend on critical_log