loglevel-datadog 1.1.0 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -0
- package/dist/loglevel-datadog.d.ts +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
# loglevel-datadog
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/loglevel-datadog?activeTab=versions)
|
|
4
|
+
[](https://bundlephobia.com/package/loglevel-datadog)
|
|
5
|
+
[](https://raw.githubusercontent.com/manbearwiz/loglevel-datadog/master/LICENSE)
|
|
6
|
+
[](https://www.npmjs.com/package/loglevel-datadog)
|
|
7
|
+
[](https://github.com/manbearwiz/loglevel-datadog/issues)
|
|
8
|
+
[](https://github.com/semantic-release/semantic-release)
|
|
9
|
+
|
|
3
10
|
Send loglevel logs from the browser to Datadog via the [datadog browser logs SDK](https://github.com/DataDog/browser-sdk/tree/main/packages/logs#browser-log-collection).
|
|
4
11
|
|
|
5
12
|
`loglevel` + `@datadog/browser-logs`
|
|
6
13
|
|
|
7
14
|
Note that adding plugins to loglevel [**will show log output line numbers as coming from inside the plugin**](https://github.com/pimterry/loglevel#writing-plugins).
|
|
8
15
|
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
npm install --save loglevel-datadog
|
|
20
|
+
```
|
|
21
|
+
|
|
9
22
|
## Usage
|
|
10
23
|
|
|
11
24
|
```ts
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { LogLevelNumbers, RootLogger } from 'loglevel';
|
|
2
1
|
import { LogsInitConfiguration, StatusType } from '@datadog/browser-logs';
|
|
2
|
+
import { LogLevelNumbers, RootLogger } from 'loglevel';
|
|
3
3
|
export declare function loglevelDatadog(logger: RootLogger, datadogConfiguration: LogsInitConfiguration, statusTypesMap?: Record<LogLevelNumbers, StatusType>): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loglevel-datadog",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "loglevel plugin to send logs from the browser to Datadog via the datadog browser logs SDK",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -46,21 +46,22 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@tsconfig/recommended": "^1.0.1",
|
|
48
48
|
"@types/node": "^16.7.13",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
50
|
-
"@typescript-eslint/parser": "^5.
|
|
51
|
-
"eslint": "^8.
|
|
52
|
-
"eslint-config-prettier": "^8.
|
|
53
|
-
"eslint-
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
|
50
|
+
"@typescript-eslint/parser": "^5.26.0",
|
|
51
|
+
"eslint": "^8.16.0",
|
|
52
|
+
"eslint-config-prettier": "^8.5.0",
|
|
53
|
+
"eslint-import-resolver-typescript": "^2.7.1",
|
|
54
|
+
"eslint-plugin-import": "^2.26.0",
|
|
54
55
|
"eslint-plugin-prettier": "^4.0.0",
|
|
55
56
|
"husky": "^7.0.4",
|
|
56
|
-
"lint-staged": "^
|
|
57
|
-
"prettier": "^2.
|
|
57
|
+
"lint-staged": "^12.4.2",
|
|
58
|
+
"prettier": "^2.6.2",
|
|
58
59
|
"semantic-release": "^19.0.2",
|
|
59
60
|
"typescript": "^4.4.2"
|
|
60
61
|
},
|
|
61
62
|
"lint-staged": {
|
|
62
|
-
"*.
|
|
63
|
-
"*.{
|
|
63
|
+
"*.ts": "eslint --cache --fix",
|
|
64
|
+
"*.{ts,css,md}": "prettier --write"
|
|
64
65
|
},
|
|
65
66
|
"release": {
|
|
66
67
|
"branches": [
|