notice 1.0.0-alpha.8 copy "notice: ^1.0.0-alpha.8" to clipboard
notice: ^1.0.0-alpha.8 copied to clipboard

An extensible logger with an intuitive tree-like structure. Notice excels in seamless cross-package logging while offering a simple yet robust API for developers.

example/notice_example.dart

import 'package:notice/filters.dart';
import 'package:notice/notice.dart';
import 'package:notice/outputs.dart';
import 'package:notice/registry.dart';

void main() {
  final notice = Notice(
    outputs: [
      FilteredOutput(
        LevelFilter(NoticeLevel.info),
        ConsoleOutput(),
      ),
    ],
    registries: [globalNoticeRegistry],
  );
  notice.info("Hello World");
  notice.trace("Will not be logged");

  final subNotice = Notice(parent: notice);
  subNotice.info("Hello World pt. 2");

  final thirdPartyNotice =
      Notice(parent: globalNoticeRegistry, breadcrumb: "FooPackage");
  thirdPartyNotice.error("Hello World from another package");

  final thirdPartySubPackage =
      Notice(parent: thirdPartyNotice, breadcrumb: "BarProcessing");
  thirdPartySubPackage.warn("Sub log from another package");
}
10
likes
0
points
250
downloads

Publisher

unverified uploader

Weekly Downloads

An extensible logger with an intuitive tree-like structure. Notice excels in seamless cross-package logging while offering a simple yet robust API for developers.

Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

fast_immutable_collections, meta

More

Packages that depend on notice