Do you need logs? Lumberdash is the answer!

Overview

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.
Comments
  • Added optional eventName parameter

    Added optional eventName parameter

    Added an optional eventName parameter in the Lumberdashclient so the developer can specify the name of the event if they would so choose to. This is specifically useful for firebase since you can log multiple events and as a developer, I would like to have the ability to name all my events differently.

    Feedback is appreciated

    opened by erickjtorres 9
  • [lumberdash] Support null safety

    [lumberdash] Support null safety

    This is a request to add support for null safety to package:lumberdash. We depend on your awesome package, so would be great to have null safety enabled.

    The Dart/Flutter team already encourages publishing the migrated packages: See this blog post.

    See the migration guide for details about enabling null safety.

    opened by IchordeDionysos 5
  • [lumberdash v2] Better design spec

    [lumberdash v2] Better design spec

    As a result of #27 , we realized that the existing API is not as flexible as we thought it would be, and that it might be tailor made to Sentry.

    Let's use this thread to propose a new/better API, and release a v2.

    Requirements are:

    • Ability to use multiple clients (simple, color, sentry, firebase...)
    • Decide on a naming convention for the API
    • Decide what's needed vs optional
    • Better and complete documentation

    Open questions:

    • Should we separate plugins into its own repos?

    @felangel @XinfengMa @erickjtorres FYI

    lumberdash-v2 
    opened by jorgecoca 5
  • [sentry_lumberdash] Support latest sentry version and add tests

    [sentry_lumberdash] Support latest sentry version and add tests

    This PR updates sentry_lumberdash to the latest Sentry version. I also added tests and it should now have complete coverage. I've also improved the documentation and various links.

    opened by ueman 4
  • Update sentry_lumberdash to Sentry v4

    Update sentry_lumberdash to Sentry v4

    Motivation

    This PR updates Sentry to >4.0.0. The new Sentry version has a lot of breaking changes.

    I've also changed to capture logs as breadcrumbs to be more in line on how to use Sentry. Also see breadcrumb type default.

    Relevant issues:

    • https://github.com/bmw-tech/lumberdash/issues/59
    • https://github.com/bmw-tech/lumberdash/pull/51
    opened by ueman 3
  • [firebase_lumberdash] dependecy check fails with firebase_analytics 3.0.0

    [firebase_lumberdash] dependecy check fails with firebase_analytics 3.0.0

    Because {project} depends on firebase_lumberdash ^1.0.0 which depends on firebase_analytics ^2.1.1, firebase_analytics ^2.1.1 is required. So, because {project} depends on firebase_analytics 3.0.0, version solving failed.

    Is support possible for the latest Firebase Analytics package please?

    enhancement 
    opened by jamieastley 3
  • Update: plugins null safety | Version 3.0.0

    Update: plugins null safety | Version 3.0.0

    Changes:

    • Updated plugins to support Lumberdash 3.0.0
    • Plugins are also null safe right now except for firebase_lumberdash, since firebase_analytics is not null safe at this moment (7.0.1)
    • Updated the CI script to check more modules other than just the root, plus support flutter modules.
    • Created an all_tests.dart at the root of the test that will call all test files main methods. This is necessary for the CI call a common test file name, since we are no longer using the test_coverage package .
    opened by fabiomcarneiro 2
  • [*_lumberdash] Support null safety

    [*_lumberdash] Support null safety

    This is a request to add support for null safety to package:colorize_lumberdash and other packages. We depend on your awesome package, so would be great to have null safety enabled.

    The Dart/Flutter team already encourages publishing the migrated packages: See this blog post.

    See the migration guide for details about enabling null safety.

    opened by IchordeDionysos 2
  • [sentry_lumberdash] sentry >=3.0.0 not supported

    [sentry_lumberdash] sentry >=3.0.0 not supported

    The 3.0.0 release of the sentry package added web support: https://pub.dev/packages/sentry/changelog#300

    sentry_lumberdash does not support the new sentry versions.

    opened by creativecreatorormaybenot 2
  • Support for multiple clients

    Support for multiple clients

    Hi,

    How can I have support for multiple plugins. For example I would like to use the Firebase and the Colorize plugin together so that logging is done to the console and also to FireBase

    lumberdash-v2 
    opened by Paul-Todd 2
  • Update Sentry in SentryLumberdash

    Update Sentry in SentryLumberdash

    This updates Sentry to version 6 which is currently in beta. The parts of Sentry which are used in this project are stable and there aren't any planned breaking changes left (I'm one of the maintainers). So this should be safe to publish. However, I'll leave it up to you if you want to do that.

    cc @fwagner @fabiomcarneiro

    opened by ueman 1
  • support latest version of Sentry

    support latest version of Sentry

    Because sentry_flutter >=6.0.0 <6.1.0-alpha.1 depends on sentry ^6.0.0 and sentry_flutter >=6.1.0-alpha.1 depends on sentry ^6.1.0-alpha.1, sentry_flutter >=6.0.0 requires sentry ^6.0.0. And because sentry_lumberdash >=3.1.0 depends on sentry ^5.0.0, sentry_lumberdash >=3.1.0 is incompatible with sentry_flutter >=6.0.0.

    So, because sogogolf depends on both sentry_flutter ^6.0.0 and sentry_lumberdash ^3.1.0, version solving failed. pub get failed (1; So, because sogogolf depends on both sentry_flutter ^6.0.0 and sentry_lumberdash ^3.1.0, version solving failed.)

    opened by SogoGolf 1
  • feat: use a more readable format for the `colorize_lumberdash` plugin

    feat: use a more readable format for the `colorize_lumberdash` plugin

    Description

    The current JSON format is not really dev-friendly when debugging. The stack trace gets trimmed and, thus, it is almost useless.

    Alternative

    I was thinking of a format similar to the logger package, which I've already integrated within a local-personal plugin but if this feature were built-in, it would be great.

    image

    If you are ok with this proposal, I'd be glad to make a PR 😄.

    opened by mrverdant13 0
  • Firebase plugin example does not work.

    Firebase plugin example does not work.

    When using the example for the firebase plugin, we get the following error from calling logWarning('Hello Warning');

    [Firebase/Analytics][I-ACS013002] Event name must contain only letters, numbers, or underscores: Hello Warning
        ga_error_value (_ev) = Hello Warning;
        ga_error_value (_ev) = Hello Warning;
        ga_error_value (_ev) = Hello Warning;
    

    I believe this is due to the fact that the message is passed as an event to firebase analytics.

    opened by chimon2000 0
  • Make logError easier human readable in console

    Make logError easier human readable in console

    The current output of logError in console is hard to scan.

    flutter: [ERROR] { exception: An error occured, stacktrace: #0      Auth0Authentication.refreshLogin.<anonymous closure> (package:my_app/authenticate/auth0_authentication.dart:168:11)
    <asynchronous suspension>
    #1      Auth0Authentication.refreshLogin.<anonymous closure> (package:my_app/authenticate/auth0_authentication.dart)
    #2      Auth0Authentication.refreshLogin (package:my_app/authenticate/auth0_authentication.dart:172:6)
    #3      SessionManager.autoLogin (package:my_app/src/session/session_manager.dart:39:36)
    <asynchronous suspension>
    
    1. The log message doesn't start with the error message but with { exception:
    2. The first list of the stacktrace is in the same line as the message pushing the important part out of view (without softwrap)
    3. Not having #0 at the beginning of the line breaks the parsing of stacktraces for tools. IntelliJ isn't able to collapse long stacktraces.

    The proposed changed adds a newline before the stacktrace starts and removes the curly braces. The output of this change looks like this:

    flutter: [ERROR] Auth0 lib failed while parsing the auth0 error response
    #0      Auth0Authentication.refreshLogin.<anonymous closure> (package:my_app/authenticate/auth0_authentication.dart:168:11)
    <asynchronous suspension>
    #1      Auth0Authentication.refreshLogin.<anonymous closure> (package:my_app/authenticate/auth0_authentication.dart)
    #2      Auth0Authentication.refreshLogin (package:my_app/authenticate/auth0_authentication.dart:172:6)
    #3      SessionManager.autoLogin (package:my_app/src/session/session_manager.dart:39:36)
    <asynchronous suspension>
    #4      runhApp.<anonymous closure>.<anonymous closure> (package:my_app/app/app.dart:105:30)
    <asynchronous suspension> [4 more...]
    
    • [x] The error message is easy to read
    • [x] Stacktrace line #0 starts at new line
    • [x] IntelliJ collapsing works
    opened by passsy 4
Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance reports for you.

ozzie.flutter Ozzie is your testing friend. Ozzie will take an screenshot during integration tests whenever you need. Ozzie will capture performance r

Jorge Coca 40 Nov 3, 2022
A flutter app that gives you affirmation you daily need by saying "I am Freaking rich!"

A very basic flutter app that gives you affirmation you daily need by saying "I am Freaking rich!" ?? What’s In This Document Get Up and Running in 5

Bhavuk kalra 1 Feb 15, 2022
A flutter package that developers have pretty logs instead just printing everything like a newbie

A flutter package that developers have pretty logs instead just printing everything like a newbie. Features Makes it easy to log to console without us

null 2 Nov 28, 2021
Unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart.

An unofficial wrapper for using Rapid7 insightOps logs (former LogEntries) with Dart. This package is using logging package to do the actual logging,

Kirill Bubochkin 2 Mar 3, 2021
Small, easy to use and extensible logger which prints beautiful logs.

Logger Small, easy to use and extensible logger which prints beautiful logs. Inspired by logger for Android. Show some ❤️ and star the repo to support

Simon Leier 1k Jan 5, 2023
The one and only Docker Tool you will ever need again

# container_tool A new Flutter project. ## Getting Started This project is a starting point for a Flutter application. A few resources to get you

null 1 Nov 17, 2021
All the tools you need to build an app in 2 minutes

All the tools you need to build an app in 2 minutes. This is the main, standard CC Core. The plan is to make this into smaller, independent modules, but for now we are making it all available.

CoCreations 0 Dec 30, 2021
The app you need for Genshin Impact

Shiori A Genshin Impact database kinda app This app is not affiliated with or endorsed by miHoYo. Shiori is just a database app for the Genshin Impact

Efrain Bastidas 153 Dec 17, 2022
A composable, light-weight package that can be used as a placeholder whenever you need some fake data

API Placeholder A composable, light-weight package that can be used as a placeholder whenever you need some fake data. With this package, you can get

ASMIT VIMAL 2 Feb 27, 2022
A flutter package that provides all icons you need

Before starting ✋ . I want to tell you that every star ?? added to my space shines my world and motivate me ?? to make more awesome things like this o

Andrew Nasef 47 Dec 29, 2022
Serialize almost everything you ever need! 📦 Supports serializing MaterialColor, Color, Size, Locale, IconData, UuidValue, DateTime, Directory, File, Duration, and many more.

osum_serializable The goal is to serialize almost everything you ever need! json_serializable is an amazing package to serialize classes but cannot se

Aswin Murali 2 Sep 23, 2022
From then on, developers only need to master one Button component, which is enough.

FButton From then on, developers only need to master one Button component, which is enough. Support corners, borders, icons, special effects, loading

Fliggy Mobile 198 Nov 22, 2022
Today we will show you how you can create your developer portfolio website and app using flutter.

Responsive and Animated Portfolio Website & App - Flutter UI Live Preview Watch it on YouTube Packages we are using: flutter_svg: link goole_fonts: li

Abu Anwar 198 Dec 30, 2022
Automatically generate profile picture with random first name and background color. But you can still provide pictures if you have them. As the default color, based on the name of the first letter. :fire: :fire: :fire:

FLUTTER PROFILE PICTURE Automatically generate profile picture with random first name and background color. But you can still provide pictures if you

Aditya Dharmawan Saputra 10 Dec 20, 2022
dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Md Abir Ahsan Tahmim 1 Dec 8, 2021
A package help you to make api call and handle error faster, also you can check for internet before call api.

http_solver ##not for production use, only for learning purpose. A package help you to make api call and handle error faster, also you can check for i

Abdelrahman Saed 1 Jun 18, 2020
Flutter package that provides you custom clippers to help you achieve various custom shapes.

flutter_custom_clippers Flutter package that provides you custom clippers to help you achieve various custom shapes. Usage To use this plugin, add flu

Damodar Lohani 291 Dec 23, 2022
This application was created using the Dart language and it is an application that contains a set of different questions and at the end shows you the number of correct answers you have answered , made by flutter

exams_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

null 0 Dec 28, 2021
Sink - Verify that you're spending more than you can afford

Sink Sink is an app that allows you to track your income and expenses. Current Status Usable Visually bearable Unusable Local App Setup While working

Simonas Viliūnas 85 Jan 3, 2023