@zthun/lumberjacky-sentry 2.2.0 → 2.2.2

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,21 +1,11 @@
1
- # Lumberjacky Log
1
+ # Lumberjacky Nest
2
2
 
3
- This is the root log framework that includes the interfaces and cross framework
4
- loggers that can be used without the need of any framework.
3
+ This is the lumberjacky package that integrates into
4
+ [Sentry](https://sentry.io/).
5
5
 
6
6
  ## Usage
7
7
 
8
8
  ```sh
9
- npm install @zthun/lumberjacky-log
10
- yarn add @zthun/lumberjacky-log
9
+ npm install @zthun/lumberjacky-sentry
10
+ yarn add @zthun/lumberjacky-sentry
11
11
  ```
12
-
13
- There are 3 loggers that are added in this package that are given to you by
14
- default.
15
-
16
- | Logger | Description |
17
- | --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
18
- | Console | Basic console logger that uses the lumberjacky interface |
19
- | Composite | Composite logger that logs to multiple sources |
20
- | Silent | Silent logger used for unit tests |
21
- | Context | Special logger that includes context information for logging. This is framework dependant. Basic console logging doesn't use this. |
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import { Client, SeverityLevel } from \"@sentry/types\";\nimport { IZLogEntry, IZLogger, ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":["ZLogLevel"],"mappings":";;;AAMO,MAAM,iBAAN,MAAM,eAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAetC,YAAoB,SAAiB;AAAjB,SAAA,UAAA;AAAA,EAAkB;AAAA,EAEtC,IAAI,OAAyB;AAClC,SAAK,QAAQ,aAAa;AAAA,MACxB,SAAS,MAAM;AAAA,MACf,OAAO,eAAc,YAAY,MAAM,KAAK;AAAA,MAC5C,OAAO;AAAA,QACL,SAAS,MAAM;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,EACH;AACF;AAzB0B,eAAA,cACtB,OAAO,OAAO;AAAA,EACZ,CAACA,eAAAA,UAAU,WAAW,GAAG;AAAA,EACzB,CAACA,eAAAA,UAAU,KAAK,GAAG;AAAA,EACnB,CAACA,eAAAA,UAAU,OAAO,GAAG;AAAA,EACrB,CAACA,eAAAA,UAAU,IAAI,GAAG;AAAA,CACnB;AAPE,IAAM,gBAAN;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import { Client, SeverityLevel } from \"@sentry/core\";\nimport { IZLogEntry, IZLogger, ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":["ZLogLevel"],"mappings":";;;AAMO,MAAM,iBAAN,MAAM,eAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAetC,YAAoB,SAAiB;AAAjB,SAAA,UAAA;AAAA,EAAkB;AAAA,EAEtC,IAAI,OAAyB;AAClC,SAAK,QAAQ,aAAa;AAAA,MACxB,SAAS,MAAM;AAAA,MACf,OAAO,eAAc,YAAY,MAAM,KAAK;AAAA,MAC5C,OAAO;AAAA,QACL,SAAS,MAAM;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,EACH;AACF;AAzB0B,eAAA,cACtB,OAAO,OAAO;AAAA,EACZ,CAACA,eAAAA,UAAU,WAAW,GAAG;AAAA,EACzB,CAACA,eAAAA,UAAU,KAAK,GAAG;AAAA,EACnB,CAACA,eAAAA,UAAU,OAAO,GAAG;AAAA,EACrB,CAACA,eAAAA,UAAU,IAAI,GAAG;AAAA,CACnB;AAPE,IAAM,gBAAN;;"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import { Client, SeverityLevel } from \"@sentry/types\";\nimport { IZLogEntry, IZLogger, ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":[],"mappings":";AAMO,MAAM,iBAAN,MAAM,eAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAetC,YAAoB,SAAiB;AAAjB,SAAA,UAAA;AAAA,EAAkB;AAAA,EAEtC,IAAI,OAAyB;AAClC,SAAK,QAAQ,aAAa;AAAA,MACxB,SAAS,MAAM;AAAA,MACf,OAAO,eAAc,YAAY,MAAM,KAAK;AAAA,MAC5C,OAAO;AAAA,QACL,SAAS,MAAM;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,EACH;AACF;AAzB0B,eAAA,cACtB,OAAO,OAAO;AAAA,EACZ,CAAC,UAAU,WAAW,GAAG;AAAA,EACzB,CAAC,UAAU,KAAK,GAAG;AAAA,EACnB,CAAC,UAAU,OAAO,GAAG;AAAA,EACrB,CAAC,UAAU,IAAI,GAAG;AAAA,CACnB;AAPE,IAAM,gBAAN;"}
1
+ {"version":3,"file":"index.js","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import { Client, SeverityLevel } from \"@sentry/core\";\nimport { IZLogEntry, IZLogger, ZLogLevel } from \"@zthun/lumberjacky-log\";\n\n/**\n * A logger that logs to sentry (https://sentry.io)\n */\nexport class ZLoggerSentry implements IZLogger {\n private static readonly SeverityMap: Record<ZLogLevel, SeverityLevel> =\n Object.freeze({\n [ZLogLevel.CATASTROPHE]: \"fatal\",\n [ZLogLevel.ERROR]: \"error\",\n [ZLogLevel.WARNING]: \"warning\",\n [ZLogLevel.INFO]: \"info\",\n });\n\n /**\n * Initializes a new instance of this object.\n *\n * @param _client -\n * The sentry client to log to.\n */\n public constructor(private _client: Client) {}\n\n public log(entry: IZLogEntry): void {\n this._client.captureEvent({\n message: entry.message,\n level: ZLoggerSentry.SeverityMap[entry.level],\n extra: {\n context: entry.context,\n },\n });\n }\n}\n"],"names":[],"mappings":";AAMO,MAAM,iBAAN,MAAM,eAAkC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAetC,YAAoB,SAAiB;AAAjB,SAAA,UAAA;AAAA,EAAkB;AAAA,EAEtC,IAAI,OAAyB;AAClC,SAAK,QAAQ,aAAa;AAAA,MACxB,SAAS,MAAM;AAAA,MACf,OAAO,eAAc,YAAY,MAAM,KAAK;AAAA,MAC5C,OAAO;AAAA,QACL,SAAS,MAAM;AAAA,MACjB;AAAA,IAAA,CACD;AAAA,EACH;AACF;AAzB0B,eAAA,cACtB,OAAO,OAAO;AAAA,EACZ,CAAC,UAAU,WAAW,GAAG;AAAA,EACzB,CAAC,UAAU,KAAK,GAAG;AAAA,EACnB,CAAC,UAAU,OAAO,GAAG;AAAA,EACrB,CAAC,UAAU,IAAI,GAAG;AAAA,CACnB;AAPE,IAAM,gBAAN;"}
@@ -1,4 +1,4 @@
1
- import { Client } from '@sentry/types';
1
+ import { Client } from '@sentry/core';
2
2
  import { IZLogEntry, IZLogger } from '@zthun/lumberjacky-log';
3
3
  /**
4
4
  * A logger that logs to sentry (https://sentry.io)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zthun/lumberjacky-sentry",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
4
4
  "description": "A standard lumberjacky log interface to interact with sentry.",
5
5
  "author": "Anthony Bonta",
6
6
  "license": "MIT",
@@ -31,33 +31,33 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@sentry/types": "^8.27.0",
35
- "@zthun/lumberjacky-log": "^2.2.0",
34
+ "@sentry/core": "^8.47.0",
35
+ "@zthun/lumberjacky-log": "^2.2.2",
36
36
  "lodash": "^4.17.21"
37
37
  },
38
38
  "devDependencies": {
39
- "typescript": "^5.5.4",
40
- "vite": "^5.4.2",
41
- "vitest": "^2.0.5",
39
+ "typescript": "~5.6.3",
40
+ "vite": "^5.4.11",
41
+ "vitest": "^2.1.8",
42
42
  "vitest-mock-extended": "^2.0.2"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@sentry/browser": "^8.19.0",
46
+ "@sentry/core": "^8.19.0",
46
47
  "@sentry/node": "^8.19.0",
47
- "@sentry/react": "^8.19.0",
48
- "@sentry/types": "^8.19.0"
48
+ "@sentry/react": "^8.19.0"
49
49
  },
50
50
  "peerDependenciesMeta": {
51
51
  "@sentry/browser": {
52
52
  "optional": true
53
53
  },
54
- "@sentry/node": {
54
+ "@sentry/core": {
55
55
  "optional": true
56
56
  },
57
- "@sentry/react": {
57
+ "@sentry/node": {
58
58
  "optional": true
59
59
  },
60
- "@sentry/types": {
60
+ "@sentry/react": {
61
61
  "optional": true
62
62
  }
63
63
  },
@@ -65,5 +65,5 @@
65
65
  "dist"
66
66
  ],
67
67
  "sideEffects": false,
68
- "gitHead": "3f632653c6722ca72d9e1c95d8cfafbc6305b051"
68
+ "gitHead": "4245690c9c761f00beac90d6e80a2cecf18ba5d2"
69
69
  }