@zthun/lumberjacky-sentry 2.1.0 → 2.2.0
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 +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/logger/logger-sentry.d.mts +0 -1
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Lumberjacky Log
|
|
2
2
|
|
|
3
|
-
This is the root log framework that includes the interfaces and cross framework
|
|
4
|
-
need of any framework.
|
|
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.
|
|
5
5
|
|
|
6
6
|
## Usage
|
|
7
7
|
|
|
@@ -10,7 +10,8 @@ npm install @zthun/lumberjacky-log
|
|
|
10
10
|
yarn add @zthun/lumberjacky-log
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
There are 3 loggers that are added in this package that are given to you by
|
|
13
|
+
There are 3 loggers that are added in this package that are given to you by
|
|
14
|
+
default.
|
|
14
15
|
|
|
15
16
|
| Logger | Description |
|
|
16
17
|
| --------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/logger/logger-sentry.mts"],"sourcesContent":["import { Client, SeverityLevel } from
|
|
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;;"}
|
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
|
|
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;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zthun/lumberjacky-sentry",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.2.0",
|
|
4
4
|
"description": "A standard lumberjacky log interface to interact with sentry.",
|
|
5
5
|
"author": "Anthony Bonta",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@sentry/types": "^8.
|
|
35
|
-
"@zthun/lumberjacky-log": "^2.
|
|
34
|
+
"@sentry/types": "^8.27.0",
|
|
35
|
+
"@zthun/lumberjacky-log": "^2.2.0",
|
|
36
36
|
"lodash": "^4.17.21"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"typescript": "^5.5.
|
|
40
|
-
"vite": "^5.
|
|
41
|
-
"vitest": "^2.0.
|
|
42
|
-
"vitest-mock-extended": "^
|
|
39
|
+
"typescript": "^5.5.4",
|
|
40
|
+
"vite": "^5.4.2",
|
|
41
|
+
"vitest": "^2.0.5",
|
|
42
|
+
"vitest-mock-extended": "^2.0.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@sentry/browser": "^8.19.0",
|
|
@@ -65,5 +65,5 @@
|
|
|
65
65
|
"dist"
|
|
66
66
|
],
|
|
67
67
|
"sideEffects": false,
|
|
68
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "3f632653c6722ca72d9e1c95d8cfafbc6305b051"
|
|
69
69
|
}
|