isolate_logger 1.0.8 copy "isolate_logger: ^1.0.8" to clipboard
isolate_logger: ^1.0.8 copied to clipboard

A logger utility for logging messages into console & in files, which will help users to track for any user events/exceptions etc.

Isolate Logger #

[coverage] The 3-Clause BSD License Pub.dev - Isolate Logger

Supported Platforms.

Android iOS macOS Linux Windows

Isolate Logger is a dart based flutter package utility designed to simplify logging messages into the console and files. It aids developers in tracking user events, exceptions, and other relevant information within their flutter applications. With Isolate Logger, you can efficiently monitor your application's behavior, identify issues, and improve user experience.

Features : #

  • Console Logging: Easily log messages directly into the console for real-time monitoring and debugging.
  • File Logging: Store log messages in files for persistent tracking and analysis, helping you identify patterns and potential problems.
  • Isolate Support: Isolate Logger supports logging in Flutter isolates, making it suitable for applications with complex asynchronous workflows.
  • Customization: Configure log levels, formats, and file storage locations according to your specific needs.
  • Disposal Mechanism: Which helps to clear all references to prevent any memory leak.
  • Logs cleanup for specific date Which helps users to setup auto cleanup service after some specific period of time.

Installation : #

To use Isolate Logger in your Flutter project, add the following dependency to your pubspec.yaml file:

dependencies:
  isolate_logger: any

Usage : #

import 'package:isolate_logger/isolate_logger.dart';
// Initialize the logger
IsolateLogger.instance.initLogger(
    timeFormat: LogTimeFormat.userFriendly,
    logIntoFile: false,
    // check for other optional params as well to customize
);
// Use this method to log info. [Check other types as well for logging effectively]
IsolateLogger.instance.logInfo(
    tag: "{tag here}",
    message: "{message here}",
    subTag: "{sub tag here}", // optional param
);
// To clear all logs and its associated files :
IsolateLogger.instance.clearAllLogs();
// To export log files as ZIP, use this :
final result = await IsolateLogger.instance.exportLogs(
    exportType: LogsExportType.all, // All & Today are the options for `exportType`
    logZipFilePrefix: "zipFilePrefix", // Optional prefix to be consider in zip file name.
);
// To dispose all utility references
IsolateLogger.instance.dispose();
// To cleanup the logs for some specific date
IsolateLogger.instance.clearLogsFor(DateTime.now().subtract(
  const Duration(days: 1),
));

Logger message types : #

  • Information : any information like app events/navigation info etc
  • Warning : any warnings that needs to be logged
  • Error : any error or exception - also has stackTrace as optional param
  • Severe : any severe exception - with mandatory stackTrace to log

💡 Feedback & Contributions #

I’d love to hear your feedback on this package! If you encounter any bugs or have feature requests, please open an issue.

If you’d like to contribute, feel free to fork the repo, make your improvements, and submit a pull request. Let’s build something amazing together! 🚀

16
likes
0
points
47
downloads

Publisher

verified publisheraliasgarvohra.com

Weekly Downloads

A logger utility for logging messages into console & in files, which will help users to track for any user events/exceptions etc.

Repository (GitHub)
View/report issues

Topics

#isolate #logging #storage #console #export

License

unknown (license)

Dependencies

archive, flutter, intl, path, path_provider

More

Packages that depend on isolate_logger