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

Small, organised and easy to use logger for you apps.

PAW 🐾 #

Paw is a compact, well-organized, and user-friendly logging tool for your apps. It's designed to log your code's journey with structure and clarity, leaving a trace of each step like a paw print.

Features: #

  • Easy to integrate and use in any Dart or Flutter project.
  • Customizable log levels for better control and clarity.
  • Lightweight design with a focus on performance.

Getting Started #

To start using Paw in your project, first install it and then initialize it at the root of your project.

// Initialize Paw logger at the root of your project
Paw.init(
 name: "myApp",
 maxStackTraces: 5,
 shouldPrintName: true,
 shouldPrintLogs: true,
 shouldIncludeSourceInfo: false,
);

That's all! You're good to go to use paw in your apps. Refer to docs for more info.

Outputs #

Paw provides clear and organized log outputs, making debugging and monitoring an easy task. Here's an example of what Paw's outputs look like:

Paw Showcase

Documentation #

Paw #

Paw is a singleton class. Initialize this class at the root of your application and use its instance anywhere in your code.

Paw.init({...});

Initialization Parameters:

  • name: The name of your application. Used for better identification in logs. Default is "paw"
  • maxStackTraces: Maximum number of stack traces to log. Useful for in-depth debugging. Default is 5
  • shouldPrintName: Determines if the app name should be included in each log. Default is true
  • shouldPrintLogs: Toggle to enable or disable log printing. Default is true
  • shouldIncludeSourceInfo: Include source file and line number information in logs. Default is true

Log Methods #

info

Log informational messages. Ideal for general app behaviors and states.

Paw().info('This is an informational message');

warn

Log warnings. Use this for non-critical issues that should be noted.

Paw().warn('This is a warning message');

debug

Log debugging information. Essential for troubleshooting and understanding complex flows.

Paw().debug({'key': 'value', 'count': 42});

error

Log errors with detailed information, including error objects and stack traces. Critical for error tracking.

try {
  // Code that might throw an error
} catch (e, stackTrace) {
  Paw().error('An unexpected error occurred', error: e, stackTrace: stackTrace);
}

Contributing #

We welcome contributions! If you'd like to improve Paw, please open an issue or an PR with your suggested changes. Happy Coding 🐾!

11
likes
0
pub points
33%
popularity

Publisher

unverified uploader

Small, organised and easy to use logger for you apps.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on paw