List the log levels in the README (#97)
Other cleanup:
- Use `repository` over `homepage.
- Use stable SDK and deps.
- Drop dependency overrides.
- Bump to v1.0 of Dart github action.
- Test on the oldest supported SDK.
Co-authored-by: John M. Wargo <johnwargo@users.noreply.github.com>
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml
index 0a2a874..cdc25d9 100644
--- a/.github/workflows/test-package.yml
+++ b/.github/workflows/test-package.yml
@@ -23,7 +23,7 @@
sdk: [dev]
steps:
- uses: actions/checkout@v2
- - uses: dart-lang/setup-dart@v0.3
+ - uses: dart-lang/setup-dart@v1.0
with:
sdk: ${{ matrix.sdk }}
- id: install
@@ -47,10 +47,10 @@
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
- sdk: [dev]
+ sdk: [2.12.0, dev]
steps:
- uses: actions/checkout@v2
- - uses: dart-lang/setup-dart@v0.3
+ - uses: dart-lang/setup-dart@v1.0
with:
sdk: ${{ matrix.sdk }}
- id: install
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 940d1bf..e1d9ad3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+## 1.0.1
+
+* List log levels in README.
+
## 1.0.0
* Stable null safety release.
diff --git a/README.md b/README.md
index 66ab316..27b1ec3 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,18 @@
});
```
-First, set the root `Level`. All messages at or above the level are sent to the
-`onRecord` stream.
+First, set the root `Level`. All messages at or above the current level are sent to the
+`onRecord` stream. Available levels are:
+
++ `Level.OFF`
++ `Level.SHOUT`
++ `Level.SEVERE`
++ `Level.WARNING`
++ `Level.INFO`
++ `Level.CONFIG`
++ `Level.FINE`
++ `Level.FINER`
++ `Level.FINEST`
Then, listen on the `onRecord` stream for `LogRecord` events. The `LogRecord`
class has various properties for the message, error, logger name, and more.
@@ -47,4 +57,13 @@
log.fine(() => [1, 2, 3, 4, 5].map((e) => e * 4).join("-"));
```
-See the `Logger` class for the different logging methods.
+Available logging methods are:
+
++ `log.shout(logged_content);`
++ `log.severe(logged_content);`
++ `log.warning(logged_content);`
++ `log.info(logged_content);`
++ `log.config(logged_content);`
++ `log.fine(logged_content);`
++ `log.finer(logged_content);`
++ `log.finest(logged_content);`
diff --git a/pubspec.yaml b/pubspec.yaml
index 4273c4e..e9e64e7 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,20 +1,15 @@
name: logging
-version: 1.0.0
+version: 1.0.1
description: >-
Provides APIs for debugging and error logging. This library introduces
abstractions similar to those used in other languages, such as the Closure
JS Logger and java.util.logging.Logger.
-homepage: https://github.com/dart-lang/logging
+repository: https://github.com/dart-lang/logging
environment:
- sdk: '>=2.12.0-0 <3.0.0'
+ sdk: ">=2.12.0 <3.0.0"
dev_dependencies:
pedantic: ^1.10.0
- test: ^1.16.0-nullsafety
-
-dependency_overrides:
- # These are required to get a version solve since they depend on this package
- coverage: ^0.13.3
- webkit_inspection_protocol: ^0.5.0
+ test: ^1.16.0