bwu_log 0.1.2

  • Installing
  • Versions
  • 63


BWU Log is a fork of Quiver log. It is a set of logging utilities that make it easy to configure and manage Dart's built in logging capabilities.

The Basics

Dart's built-in logging utilities are fairly low level. This means each time you start a new project you have to copy/paste a bunch of logging configuration code to setup output locations and logging formats. BWU Log provides a set of higher-level abstractions to make it easier to get logging setup correctly. Specifically, there are two new concepts: appender and formatter. Appenders define output locations like the console, http or even in-memory data structures that can store logs. Formatters, as the name implies, allow for custom logging formats.

Here is a simple example that sets up a InMemoryAppender with a SimpleStringFormatter:

import 'package:logging/logging.dart';
import 'package:bwu_log/log.dart';

class SimpleStringFormatter implements FormatterBase<String> {
  String call(LogRecord record) => record.message;

main() {
  var logger = new Logger('bwu.TestLogger');
  var appender = new InMemoryListAppender(new SimpleStringFormatter());

That's all there is to it!

BWU Log provides three Appenders: PrintAppender which uses Dart's print statement to write to the console, InMemoryListAppender which writes logs to a simple list (this can be useful for debugging or testing). Additionally, a single Formatter called BasicLogFormatter is included and uses a "MMyy HH:mm:ss.S" format. Of course there is no limit to what kind of appenders you can create, we have plans to add appenders HTTP, WebSocket, DOM, Isolate and SysOut.

To create a new kind of Appender simply extends Appender. To create a new Formatter just implement the Formatter typedef or FormatterBase class if you need to hold state in your formatter. Take a look at PrintAppender and BasicLogFormatter for an example.


  • add simple default initialization for the PrintAppender with setup_print_appender.dart


  • remove Polymer component and dependency
  • upgrade dependencies

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  bwu_log: "^0.1.2"

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

      import 'package:bwu_log/bwu_log.dart';
Version Uploaded Documentation Archive
0.1.2 Apr 25, 2016 Go to the documentation of bwu_log 0.1.2 Download bwu_log 0.1.2 archive
0.1.1 Apr 25, 2016 Go to the documentation of bwu_log 0.1.1 Download bwu_log 0.1.1 archive
0.1.0 Apr 11, 2016 Go to the documentation of bwu_log 0.1.0 Download bwu_log 0.1.0 archive
2.0.0-alpha.2 Feb 14, 2017 Go to the documentation of bwu_log 2.0.0-alpha.2 Download bwu_log 2.0.0-alpha.2 archive
2.0.0-alpha.1 Feb 13, 2017 Go to the documentation of bwu_log 2.0.0-alpha.1 Download bwu_log 2.0.0-alpha.1 archive
2.0.0-alpha.0 Feb 13, 2017 Go to the documentation of bwu_log 2.0.0-alpha.0 Download bwu_log 2.0.0-alpha.0 archive


We analyzed this package on Jun 19, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3


Describes how popular the package is relative to other packages. [more]
66 / 100
Code health derived from static analysis. [more]
100 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]
Learn more about scoring.


Detected platforms: Flutter, web, other

No platform restriction found in primary library package:bwu_log/bwu_log.dart.


  • Package is too old.

    The package was released more than two years ago.

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Maintain an example.

    Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use bwu_log.dart.

  • Use analysis_options.yaml.

    Rename old .analysis_options file to analysis_options.yaml.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.12.0 <2.0.0
intl ^0.12.7 0.12.7+1 0.15.6
logging ^0.11.0 0.11.3+1
path ^1.1.0 1.6.1
Transitive dependencies
analyzer 0.27.6 0.32.1
args 0.13.7 1.4.3
async 2.0.7
charcode 1.1.1
collection 1.14.10
convert 2.0.1
crypto 2.0.5
csslib 0.14.4
glob 1.1.5
html 0.13.3+1
isolate 0.2.3 2.0.1
matcher 0.12.3
package_config 1.0.3
petitparser 1.7.6
plugin 0.2.0+2
source_span 1.4.0
stack_trace 1.9.2
string_scanner 1.0.2
typed_data 1.1.5
utf 0.9.0+4
watcher 0.9.7+8
yaml 2.1.14
Dev dependencies
bwu_grinder_tasks ^0.1.0-dev
grinder ^0.8.0+2
mock ^0.12.0
test ^0.12.0