Level class
An enum type for defining the different logging levels. By default, ERROR and WARNING messages are printed to sterr. MESSAGE messages are printed to stdout, and others are ignored.
class Level { /// An error occurred and an operation could not be completed. Usually shown /// to the user on stderr. static const ERROR = const Level._("ERR "); /// Something unexpected happened, but the program was able to continue, /// though possibly in a degraded fashion. static const WARNING = const Level._("WARN"); /// A message intended specifically to be shown to the user. static const MESSAGE = const Level._("MSG "); /// Some interaction with the external world occurred, such as a network /// operation, process spawning, or file IO. static const IO = const Level._("IO "); /// Incremental output during pub's version constraint solver. static const SOLVER = const Level._("SLVR"); /// Fine-grained and verbose additional information. Can be used to provide /// program state context for other logs (such as what pub was doing when an /// IO operation occurred) or just more detail for an operation. static const FINE = const Level._("FINE"); const Level._(this.name); final String name; String toString() => name; int get hashCode => name.hashCode; }
Static Properties
const ERROR #
An error occurred and an operation could not be completed. Usually shown to the user on stderr.
static const ERROR = const Level._("ERR ")
const FINE #
Fine-grained and verbose additional information. Can be used to provide program state context for other logs (such as what pub was doing when an IO operation occurred) or just more detail for an operation.
static const FINE = const Level._("FINE")
const IO #
Some interaction with the external world occurred, such as a network operation, process spawning, or file IO.
static const IO = const Level._("IO ")
const MESSAGE #
A message intended specifically to be shown to the user.
static const MESSAGE = const Level._("MSG ")
const SOLVER #
Incremental output during pub's version constraint solver.
static const SOLVER = const Level._("SLVR")
const WARNING #
Something unexpected happened, but the program was able to continue, though possibly in a degraded fashion.
static const WARNING = const Level._("WARN")
Properties
final int hashCode #
Get a hash code for this object.
All objects have hash codes. Hash codes are guaranteed to be the
same for objects that are equal when compared using the equality
operator ==
. Other than that there are no guarantees about
the hash codes. They will not be consistent between runs and
there are no distribution guarantees.
If a subclass overrides hashCode it should override the equality operator as well to maintain consistency.
int get hashCode => name.hashCode;