This repository was archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 52
add lowercase versions of the constants #46
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,48 +271,61 @@ class Level implements Comparable<Level> { | |
const Level(this.name, this.value); | ||
|
||
/// Special key to turn on logging for all levels ([value] = 0). | ||
static const Level ALL = const Level('ALL', 0); | ||
static const Level all = const Level('ALL', 0); | ||
static const Level ALL = all; | ||
|
||
/// Special key to turn off all logging ([value] = 2000). | ||
static const Level OFF = const Level('OFF', 2000); | ||
static const Level off = const Level('OFF', 2000); | ||
static const Level OFF = off; | ||
|
||
/// Key for highly detailed tracing ([value] = 300). | ||
static const Level FINEST = const Level('FINEST', 300); | ||
static const Level finest = const Level('FINEST', 300); | ||
static const Level FINEST = finest; | ||
|
||
/// Key for fairly detailed tracing ([value] = 400). | ||
static const Level FINER = const Level('FINER', 400); | ||
static const Level finer = const Level('FINER', 400); | ||
static const Level FINER = finer; | ||
|
||
/// Key for tracing information ([value] = 500). | ||
static const Level FINE = const Level('FINE', 500); | ||
static const Level fine = const Level('FINE', 500); | ||
static const Level FINE = fine; | ||
|
||
/// Key for static configuration messages ([value] = 700). | ||
static const Level CONFIG = const Level('CONFIG', 700); | ||
static const Level config = const Level('CONFIG', 700); | ||
static const Level CONFIG = config; | ||
|
||
/// Key for informational messages ([value] = 800). | ||
static const Level INFO = const Level('INFO', 800); | ||
static const Level info = const Level('INFO', 800); | ||
static const Level INFO = info; | ||
|
||
/// Key for potential problems ([value] = 900). | ||
static const Level WARNING = const Level('WARNING', 900); | ||
static const Level warning = const Level('WARNING', 900); | ||
static const Level WARNING = warning; | ||
|
||
/// Key for serious failures ([value] = 1000). | ||
static const Level SEVERE = const Level('SEVERE', 1000); | ||
static const Level severe = const Level('SEVERE', 1000); | ||
static const Level SEVERE = severe; | ||
|
||
/// Key for extra debugging loudness ([value] = 1200). | ||
static const Level SHOUT = const Level('SHOUT', 1200); | ||
|
||
static const List<Level> LEVELS = const [ | ||
ALL, | ||
FINEST, | ||
FINER, | ||
FINE, | ||
CONFIG, | ||
INFO, | ||
WARNING, | ||
SEVERE, | ||
SHOUT, | ||
OFF | ||
static const Level shout = const Level('SHOUT', 1200); | ||
static const Level SHOUT = shout; | ||
|
||
/// The list of all the predefined logging levels. | ||
static const List<Level> levels = const [ | ||
all, | ||
finest, | ||
finer, | ||
fine, | ||
config, | ||
info, | ||
warning, | ||
severe, | ||
shout, | ||
off, | ||
]; | ||
|
||
static const List<Level> LEVELS = levels; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And deprecate this too. 👍 |
||
|
||
@override | ||
bool operator ==(Object other) => other is Level && value == other.value; | ||
bool operator <(Level other) => value < other.value; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest we go ahead and
@deprecate
all these.