notice 1.1.0 copy "notice: ^1.1.0" to clipboard
notice: ^1.1.0 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");
}
9
likes
0
pub points
34%
popularity

Publisher

unverified uploader

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

Topics

#logging #notice

License

unknown (LICENSE)

Dependencies

fast_immutable_collections, meta

More

Packages that depend on notice