Code Monkey home page Code Monkey logo

dartlog's Introduction

Dart Logger Package

A lightweight and customizable logging package for Dart applications.

Features

  • Customizable Log Levels: Supports various log levels like info, debug, warning, and error.
  • Colorized Output: Enhances readability with ANSI colored log messages.
  • Detailed Logging: Option to include detailed logging with file locations and line numbers.
  • Dynamic Configuration: Supports setting up package prefix and base path dynamically.

Getting Started

Basic Usage

Import the package in your Dart file:

import 'package:dartlog/dartlog.dart';

Initialize the logger:

Logger.initialize(
  packagePrefix: 'your_package_prefix',
  basePath: 'your_base_path',
  detailedLogging: true // or false
);

Advanced Configuration

You can customize the logging behavior by setting the packagePrefix, basePath, and detailedLogging during initialization. This allows for more precise log messages, especially in larger projects.

Enhanced VSCode Integration

  • Base Path (basePath): This setting helps in mapping the file paths in the logs to the actual files in your project. When you click on a file path in the log within VSCode, it will directly jump to the respective file and line in your code, enhancing the debugging experience.

  • Package Prefix (packagePrefix): This setting is used to filter and display log entries relevant to your project. It enables VSCode to recognize and link stack trace paths in the log to the corresponding files in your project. This feature is especially useful for quickly navigating to the source of an error or warning directly from the log output.

These settings make the logger not only a powerful tool for recording and viewing log messages but also integrate seamlessly with VSCode, making debugging and code navigation much more efficient.

dartlog's People

Contributors

a-dev-mobile avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.