Skip to content

Commit 32a7c39

Browse files
committed
Merge package:logging into the core monorepo
2 parents 279afbc + 77c93eb commit 32a7c39

File tree

17 files changed

+1719
-0
lines changed

17 files changed

+1719
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Dependabot configuration file.
2+
version: 2
3+
4+
updates:
5+
- package-ecosystem: github-actions
6+
directory: /
7+
schedule:
8+
interval: monthly
9+
labels:
10+
- autosubmit
11+
groups:
12+
github-actions:
13+
patterns:
14+
- "*"
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# A workflow to close issues where the author hasn't responded to a request for
2+
# more information; see https://github.com/actions/stale.
3+
4+
name: No Response
5+
6+
# Run as a daily cron.
7+
on:
8+
schedule:
9+
# Every day at 8am
10+
- cron: '0 8 * * *'
11+
12+
# All permissions not specified are set to 'none'.
13+
permissions:
14+
issues: write
15+
pull-requests: write
16+
17+
jobs:
18+
no-response:
19+
runs-on: ubuntu-latest
20+
if: ${{ github.repository_owner == 'dart-lang' }}
21+
steps:
22+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
23+
with:
24+
# Don't automatically mark inactive issues+PRs as stale.
25+
days-before-stale: -1
26+
# Close needs-info issues and PRs after 14 days of inactivity.
27+
days-before-close: 14
28+
stale-issue-label: "needs-info"
29+
close-issue-message: >
30+
Without additional information we're not able to resolve this issue.
31+
Feel free to add more info or respond to any questions above and we
32+
can reopen the case. Thanks for your contribution!
33+
stale-pr-label: "needs-info"
34+
close-pr-message: >
35+
Without additional information we're not able to resolve this PR.
36+
Feel free to add more info or respond to any questions above.
37+
Thanks for your contribution!
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# A CI configuration to auto-publish pub packages.
2+
3+
name: Publish
4+
5+
on:
6+
pull_request:
7+
branches: [ master ]
8+
push:
9+
tags: [ 'v[0-9]+.[0-9]+.[0-9]+' ]
10+
11+
jobs:
12+
publish:
13+
if: ${{ github.repository_owner == 'dart-lang' }}
14+
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
15+
permissions:
16+
id-token: write # Required for authentication using OIDC
17+
pull-requests: write # Required for writing the pull request note
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Dart CI
2+
3+
on:
4+
# Run on PRs and pushes to the default branch.
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
branches: [ master ]
9+
schedule:
10+
- cron: "0 0 * * 0"
11+
12+
env:
13+
PUB_ENVIRONMENT: bot.github
14+
15+
jobs:
16+
# Check code formatting and static analysis.
17+
analyze:
18+
runs-on: ubuntu-latest
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
sdk: [dev]
23+
steps:
24+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
25+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
26+
with:
27+
sdk: ${{ matrix.sdk }}
28+
- id: install
29+
name: Install dependencies
30+
run: dart pub get
31+
- name: Check formatting
32+
run: dart format --output=none --set-exit-if-changed .
33+
if: always() && steps.install.outcome == 'success'
34+
- name: Analyze code
35+
run: dart analyze --fatal-infos
36+
if: always() && steps.install.outcome == 'success'
37+
38+
# Run tests on a matrix of platforms and sdk versions.
39+
test:
40+
needs: analyze
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false
44+
matrix:
45+
# Add macos-latest and/or windows-latest if relevant for this package.
46+
os: [ubuntu-latest]
47+
sdk: [3.4, dev]
48+
steps:
49+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938
50+
- uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672
51+
with:
52+
sdk: ${{ matrix.sdk }}
53+
- id: install
54+
name: Install dependencies
55+
run: dart pub get
56+
- name: Run VM tests
57+
run: dart test --platform vm
58+
if: always() && steps.install.outcome == 'success'
59+
- name: Run Chrome tests
60+
run: dart test --platform chrome
61+
if: always() && steps.install.outcome == 'success'

pkgs/logging/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.dart_tool
2+
.packages
3+
pubspec.lock

pkgs/logging/AUTHORS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Names should be added to this file with this pattern:
2+
#
3+
# For individuals:
4+
# Name <email address>
5+
#
6+
# For organizations:
7+
# Organization <fnmatch pattern>
8+
#
9+
Google Inc. <*@google.com>
10+
Anton Astashov <[email protected]>

pkgs/logging/CHANGELOG.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## 1.3.0-wip
2+
3+
* Override empty stack traces for trace level events.
4+
* Require Dart 3.4
5+
6+
## 1.2.0
7+
8+
* Add notification when the log level is changed. Logger `onLevelChanged` broadcasts a stream of level values.
9+
* Require Dart 2.19.
10+
11+
## 1.1.1
12+
13+
* Add a check that throws if a logger name ends with '.'.
14+
* Require Dart 2.18
15+
16+
## 1.1.0
17+
18+
* Add `Logger.attachedLoggers` which exposes all loggers created with the
19+
default constructor.
20+
* Enable the `avoid_dynamic_calls` lint.
21+
22+
## 1.0.2
23+
24+
* Update description.
25+
* Add example.
26+
27+
## 1.0.1
28+
29+
* List log levels in README.
30+
31+
## 1.0.0
32+
33+
* Stable null safety release.
34+
35+
## 1.0.0-nullsafety.0
36+
37+
* Migrate to null safety.
38+
* Removed the deprecated `LoggerHandler` typedef.
39+
40+
## 0.11.4
41+
42+
* Add top level `defaultLevel`.
43+
* Require Dart `>=2.0.0`.
44+
* Make detached loggers work regardless of `hierarchicalLoggingEnabled`.
45+
46+
## 0.11.3+2
47+
48+
* Set max SDK version to `<3.0.0`, and adjust other dependencies.
49+
50+
## 0.11.3+1
51+
52+
* Fixed several documentation comments.
53+
54+
## 0.11.3
55+
56+
* Added optional `LogRecord.object` field.
57+
58+
* `Logger.log` sets `LogRecord.object` if the message is not a string or a
59+
function that returns a string. So that a handler can access the original
60+
object instead of just its `toString()`.
61+
62+
## 0.11.2
63+
64+
* Added `Logger.detached` - a convenience factory to obtain a logger that is not
65+
attached to this library's logger hierarchy.
66+
67+
## 0.11.1+1
68+
69+
* Include default error with the auto-generated stack traces.
70+
71+
## 0.11.1
72+
73+
* Add support for automatically logging the stack trace on error messages. Note
74+
this can be expensive, so it is off by default.
75+
76+
## 0.11.0
77+
78+
* Revert change in `0.10.0`. `stackTrace` must be an instance of `StackTrace`.
79+
Use the `Trace` class from the [stack_trace package][] to convert strings.
80+
81+
[stack_trace package]: https://pub.dev/packages/stack_trace
82+
83+
## 0.10.0
84+
85+
* Change type of `stackTrace` from `StackTrace` to `Object`.
86+
87+
## 0.9.3
88+
89+
* Added optional `LogRecord.zone` field.
90+
91+
* Record current zone (or user specified zone) when creating new `LogRecord`s.

pkgs/logging/LICENSE

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Copyright 2013, the Dart project authors.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following
11+
disclaimer in the documentation and/or other materials provided
12+
with the distribution.
13+
* Neither the name of Google LLC nor the names of its
14+
contributors may be used to endorse or promote products derived
15+
from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)