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 CHANGED
@@ -1,11 +1,24 @@
1
1
  # loglevel-datadog
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/loglevel-datadog?style=flat-square)](https://www.npmjs.com/package/loglevel-datadog?activeTab=versions)
4
+ [![npm bundle size](https://img.shields.io/bundlephobia/minzip/loglevel-datadog?style=flat-square)](https://bundlephobia.com/package/loglevel-datadog)
5
+ [![NPM](https://img.shields.io/npm/l/loglevel-datadog?style=flat-square)](https://raw.githubusercontent.com/manbearwiz/loglevel-datadog/master/LICENSE)
6
+ [![npm](https://img.shields.io/npm/dt/loglevel-datadog?style=flat-square)](https://www.npmjs.com/package/loglevel-datadog)
7
+ [![GitHub issues](https://img.shields.io/github/issues/manbearwiz/loglevel-datadog?style=flat-square)](https://github.com/manbearwiz/loglevel-datadog/issues)
8
+ [![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release&style=flat-square)](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.0",
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.5.0",
50
- "@typescript-eslint/parser": "^5.5.0",
51
- "eslint": "^8.3.0",
52
- "eslint-config-prettier": "^8.3.0",
53
- "eslint-plugin-import": "^2.25.3",
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": "^11.2.6",
57
- "prettier": "^2.5.0",
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
- "*.js": "eslint --cache --fix",
63
- "*.{js,css,md}": "prettier --write"
63
+ "*.ts": "eslint --cache --fix",
64
+ "*.{ts,css,md}": "prettier --write"
64
65
  },
65
66
  "release": {
66
67
  "branches": [