搜索插件、代码仓与 APP 分类

插件详情v3.0.0

colorize_lumberdash

Lumberdash 插件,根据日志的严重性级别对 stdout 中的日志进行着色

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
1.8万
喜欢数
4
Pub 分数
140

安装插件

flutter pub add colorize_lumberdash

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Colorize Lumberdash 是一个 Flutter/Dart 插件,通过根据严重性级别(例如,错误用红色,警告用黄色)对日志输出应用颜色编码来增强日志输出。它与 Lumberdash 日志框架无缝集成,可跨多个平台提高可读性和调试效率。非常适合希望在开发和测试过程中获得视觉上区分明显的日志的开发者。

适合场景

  • 开发中的实时调试
  • 终端输出中改进的日志可见性
  • 通过清晰的日志区分增强团队协作
  • 快速识别错误和警告
  • 跨平台日志一致性

主要特点

  • 按严重程度颜色编码日志
  • 与 Lumberdash 的无缝集成
  • 支持所有主要的Flutter平台
  • 所需配置最少
  • 简洁、可读的控制台输出

适合对象

  • 使用 Lumberdash 的 Flutter 开发人员
  • 优先考虑日志清晰度的团队
  • 开发多平台应用程序的开发者
  • 调试密集型工作流
  • 带有终端日志的 CI/CD 环境

使用建议

  • 需要安装 Lumberdash
  • 在某些非 TTY 环境中,颜色可能无法渲染
  • 不适用于生产日志输出
  • 超出基于严重性的着色之外的自定义功能有限
  • 可能与其他日志格式化程序冲突

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

lumberdash

Build Status codecov Pub

lumberdash icon

Do you need logs? Lumberdash is the answer! With a simple but powerful logging API, Lumberdash is the easiest way to record logs. And if that is not enough, you can extend its API and create your own custom plugins for your own logging needs.

How it works

Simply putLumberdashToWork with your preferred LumberdashClient, and start logging!

You can get the best of Lumberdash by using plugins! For example, by using the colorize_lumberdash, you could print logs in stdout with colors:

import 'package:lumberdash/lumberdash.dart';
import 'package:colorize_lumberdash/colorize_lumberdash.dart';

void main() {
  putLumberdashToWork(withClients: [ColorizeLumberdash()]);
  logWarning('Hello Warning');
  logFatal('Hello Fatal!');
  logMessage('Hello Message!');
  logError(Exception('Hello Error'));
}

You could also use multiple clients to log to different sources:

import 'package:lumberdash/lumberdash.dart';
import 'package:colorize_lumberdash/colorize_lumberdash.dart';
import 'package:firebase_lumberdash/firebase_lumberdash.dart';

void main() {
  putLumberdashToWork(withClients: [
    ColorizeLumberdash(),
    FirebaseLumberdash(
      firebaseAnalyticsClient: FirebaseAnalytics(),
      environment: 'development',
      releaseVersion: '1.0.0',
    ),
  ]);
  logWarning('Hello Warning');
  logFatal('Hello Fatal!');
  logMessage('Hello Message!');
  logError(Exception('Hello Error'));
}

Plugins officially supported by BMW

How to create a Lumberdash plugin

Add lumberdash to your dependencies, and extend the LumberdashClient. That easy!

You can see the SimpleClient in this package as inspiration.

Maintainers

This project is maintained by BMW Group.

Thank you to the original authors

  • Jorge Coca (@jorgecoca)
  • Felix Angelov (@felangel)
  • Tim Chabot(@tchabot22)

and all contributors.

License

MIT License

Copyright (c) 2019 BMW Technology Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

所属分类

依赖

依赖清单 3 项

源码仓库

使用此插件的项目

暂无相关数据。