plexus 5.0.0-dev.6 plexus: ^5.0.0-dev.6 copied to clipboard
Plexus is an advanced, modular event framework, driven by the desire for a first-class, logging experience.
Plexus #
Plexus is an advanced, modular event framework, driven by the desire for a first-class, logging experience. While the primary goal of Plexus is to provide a first-class logging experience, it is designed with many other applications in mind.
To see an example of how Plexus works, head on over to the example. To learn about the basics, just keep reading.
Modules #
Plexus uses Modules to organize and manage events. To attach a module to an arbitrary class, use with HasModule
and override the package
getter. The package must be a (preferably constant) list of strings containing only lowercase and uppercase letters, numbers, and underscores. It is preferable that this package follows typical reverse domain name notation, optionally omitting "ext.", instead sticking with a Dart package name.
Logging #
Plexus supports logging through the module event system, aided by the Level
class for filtering and organization. The Level
class has a map that links Plexus levels to Dart Logging levels. Each Level
instance also has a field holding its corresponding Dart Logging levels.
Plexus ships with the consoleHandler
function that takes an Event
and, optionally, a Stdout
that defaults to Dart I/O's stdout and writes formatted log lines to the passed Stdout
.