@mysetup/logger 2.0.1 → 2.0.4
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 +31 -0
- package/dist/index.d.ts +0 -1
- package/dist/logger.d.ts +0 -1
- package/package.json +51 -38
- package/dist/index.d.ts.map +0 -1
- package/dist/logger.d.ts.map +0 -1
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# @mysetup/logger
|
|
2
|
+
|
|
3
|
+
Shared logger package built on top of `pino`.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @mysetup/logger
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Supported libraries and runtimes
|
|
12
|
+
|
|
13
|
+
| Supported | Notes |
|
|
14
|
+
| ---------------------- | ------------- |
|
|
15
|
+
| Node.js | Full support |
|
|
16
|
+
| Next.js server runtime | Supported |
|
|
17
|
+
| Vite browser apps | Not supported |
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { logger } from "@mysetup/logger";
|
|
23
|
+
|
|
24
|
+
logger.info("Application started");
|
|
25
|
+
logger.error({ err: new Error("Example") }, "Request failed");
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Notes
|
|
29
|
+
|
|
30
|
+
- The package exports a ready-to-use `pino` logger instance.
|
|
31
|
+
- Extend or wrap it in the consuming app if you need transport-specific configuration.
|
package/dist/index.d.ts
CHANGED
package/dist/logger.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,40 +1,53 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
2
|
+
"name": "@mysetup/logger",
|
|
3
|
+
"version": "2.0.4",
|
|
4
|
+
"description": "Shared Pino logger instance for Node.js services and apps.",
|
|
5
|
+
"author": "krishnaraj <krishnaraj.webdev@gmail.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"logger",
|
|
9
|
+
"pino",
|
|
10
|
+
"logging",
|
|
11
|
+
"nodejs",
|
|
12
|
+
"typescript"
|
|
13
|
+
],
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"sideEffects": false,
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"import": "./dist/index.js",
|
|
27
|
+
"require": "./dist/index.js"
|
|
16
28
|
},
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
}
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"pino": "9.6.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@types/node": "^22.13.1",
|
|
36
|
+
"typescript": "5.5.4",
|
|
37
|
+
"@mysetup/eslint-config": "^2.0.5",
|
|
38
|
+
"@mysetup/tsconfig": "^2.0.4",
|
|
39
|
+
"@mysetup/prettier-config": "^2.0.4"
|
|
40
|
+
},
|
|
41
|
+
"prettier": "@mysetup/prettier-config",
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=20.15.1"
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"lint": "node ../scripts/run-eslint.cjs .",
|
|
47
|
+
"typecheck": "tsc --noEmit",
|
|
48
|
+
"build": "node ../scripts/package-fs.cjs remove dist && tsc",
|
|
49
|
+
"format": "prettier --write \"**/*.{ts,tsx,md,js}\"",
|
|
50
|
+
"checks": "pnpm typecheck && pnpm lint && pnpm build",
|
|
51
|
+
"clean": "node ../scripts/package-fs.cjs remove node_modules .swc dist pnpm-lock.yaml && echo \"Cleaned\""
|
|
52
|
+
}
|
|
53
|
+
}
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
package/dist/logger.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,YAAY,EAAE,MAAM,EAAE,CAAC;AAGvB,QAAA,MAAM,MAAM,EAAE,MAAiB,CAAC;AAEhC,OAAO,EAAE,MAAM,EAAE,CAAC"}
|