log4dart 1.4.19

  • README.md
  • Installing
  • Versions
  • 10

Build Status Coverage Status


Logging library with multiple appenders, configurable formatting and log tracing.

Getting Started

1. Add the folowing to your pubspec.yaml and run pub install

	  log4dart: any

2. Add log4dart to some code and run it

	import "package:log4dart/log4dart.dart";
	main() {
		var myClass = new MyClass();
	class MyClass {
		static final _logger = LoggerFactory.getLoggerFor(MyClass);
		someMethod() {
			_logger.info("a info message");
			// :
			_logger.warnFormat("%s %s", ["message", "formatting"]);

Creating Loggers

Log4Dart is split in multiple libraries so it can run on both servers and in browsers.

// for client side logging (works both on the VM and when compiled to JS)
import "package:log4dart/log4dart.dart";

// for VM logging, allows you to log to files (does not compile to JS) 
import "package:log4dart/log4dart_vm.dart";

When you want to retrieve a logger instance you can do it in one of two ways

  1. LoggerFactory.getLoggerFor(MyClass) - logger with the fully qualified name of MyClass
  2. LoggerFactory.getLogger("MyClass") - logger with the name "MyClass"

Where the qualified name is the library name and type name concatenated together.

More Information

The configuration guide covers everything from log level setup to output formatting. For more advanced features, such as log tracing, check out the advanced feature guide.


  • Remove dependency on meta package


  • Correct copyright message


  • Bump dependencies


  • Rewrite tests to gain better code coverage


  • Further fixes to organize project to work with Travis CI


  • Switch to Travis CI


  • Switch to new Dart test library


  • Add changelog

Use this package as a library

1. Depend on it

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

  log4dart: ^1.4.19

2. Install it

You can install packages from the command line:

with pub:

$ pub get

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

3. Import it

Now in your Dart code, you can use:

import 'package:log4dart/log4dart.dart';
Version Uploaded Documentation Archive
1.4.19 Apr 19, 2016 Go to the documentation of log4dart 1.4.19 Download log4dart 1.4.19 archive
1.4.18 Feb 1, 2016 Go to the documentation of log4dart 1.4.18 Download log4dart 1.4.18 archive
1.4.17 Feb 1, 2016 Go to the documentation of log4dart 1.4.17 Download log4dart 1.4.17 archive
1.4.16 Aug 4, 2015 Go to the documentation of log4dart 1.4.16 Download log4dart 1.4.16 archive
1.4.15 Jun 30, 2015 Go to the documentation of log4dart 1.4.15 Download log4dart 1.4.15 archive
1.4.14 May 23, 2015 Go to the documentation of log4dart 1.4.14 Download log4dart 1.4.14 archive
1.4.13 Mar 13, 2015 Go to the documentation of log4dart 1.4.13 Download log4dart 1.4.13 archive
1.4.12 Nov 13, 2013 Go to the documentation of log4dart 1.4.12 Download log4dart 1.4.12 archive
1.4.11 Nov 3, 2013 Go to the documentation of log4dart 1.4.11 Download log4dart 1.4.11 archive
1.4.10 Oct 23, 2013 Go to the documentation of log4dart 1.4.10 Download log4dart 1.4.10 archive

All 33 versions...

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

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Maintenance issues and suggestions

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <2.0.0