@icd-iot-aicf/nestjs-logger 1.0.1 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icd-iot-aicf/nestjs-logger",
3
- "version": "1.0.1",
3
+ "version": "1.1.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -12,26 +12,25 @@
12
12
  },
13
13
  "scripts": {
14
14
  "build": "nest build",
15
- "prepare": "yarn build",
16
15
  "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
17
16
  "start": "env-cmd nest start",
18
17
  "start:dev": "env-cmd nest start --watch",
19
18
  "start:debug": "nest start --debug --watch",
20
19
  "start:prod": "node dist/main",
21
20
  "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
22
- "test:amqp": "yarn build && cd examples-test/test-logs && yarn run autorun:amqp",
23
- "test:http": "yarn build && cd examples-test/test-logs && yarn run autorun:http",
21
+ "test:amqp": "nest build && cd examples-test/test-logs && nest run autorun:amqp",
22
+ "test:http": "nest build && cd examples-test/test-logs && nest run autorun:http",
24
23
  "test": "jest",
25
24
  "test:watch": "jest --watch",
26
25
  "test:cov": "jest --coverage",
27
26
  "test:e2e": "jest --config ./test/jest-e2e.json"
28
27
  },
29
28
  "peerDependencies": {
30
- "@nestjs/core": "^11.0.11",
29
+ "@nestjs/axios": "^4.0.0",
31
30
  "@nestjs/common": "^11.0.11",
32
- "@nestjs/platform-express": "^11.0.11",
33
31
  "@nestjs/config": "^4.0.1",
34
- "@nestjs/axios": "^4.0.0",
32
+ "@nestjs/core": "^11.0.11",
33
+ "@nestjs/platform-express": "^11.0.11",
35
34
  "@willsoto/nestjs-prometheus": "^6.0.2",
36
35
  "class-transformer": "^0.5.1",
37
36
  "mongoose": "^8.0.0",
@@ -39,27 +38,23 @@
39
38
  },
40
39
  "dependencies": {
41
40
  "@types/microtime": "^2.1.2",
41
+ "axios": "^1.8.3",
42
42
  "babel-plugin-transform-imports": "^2.0.0",
43
+ "dayjs": "^1.11.13",
43
44
  "microtime": "^3.1.1",
44
45
  "moment-timezone": "^0.5.47",
45
46
  "prom-client": "^15.1.3",
46
- "axios": "^1.8.3",
47
- "dayjs": "^1.11.13",
48
47
  "uuid": "^11.1.0",
49
48
  "winston": "^3.17.0",
50
49
  "winston-daily-rotate-file": "^5.0.0"
51
50
  },
52
51
  "devDependencies": {
53
- "@nestjs/core": "^11.0.11",
54
- "@nestjs/common": "^11.0.11",
55
- "@nestjs/platform-express": "^11.0.11",
56
- "@nestjs/config": "^4.0.1",
57
52
  "@nestjs/axios": "^4.0.0",
58
- "@willsoto/nestjs-prometheus": "^6.0.2",
59
- "class-transformer": "^0.5.1",
60
- "mongoose": "^8.19.3",
61
- "rxjs": "^7.8.2",
62
53
  "@nestjs/cli": "^11.0.5",
54
+ "@nestjs/common": "^11.0.11",
55
+ "@nestjs/config": "^4.0.1",
56
+ "@nestjs/core": "^11.0.11",
57
+ "@nestjs/platform-express": "^11.0.11",
63
58
  "@nestjs/schematics": "^11.0.2",
64
59
  "@nestjs/testing": "^11.0.11",
65
60
  "@types/express": "^5.0.0",
@@ -68,19 +63,23 @@
68
63
  "@types/supertest": "^6.0.2",
69
64
  "@typescript-eslint/eslint-plugin": "^8.26.1",
70
65
  "@typescript-eslint/parser": "^8.26.1",
66
+ "@willsoto/nestjs-prometheus": "^6.0.2",
67
+ "class-transformer": "^0.5.1",
68
+ "env-cmd": "^10.1.0",
71
69
  "eslint": "^9.22.0",
72
70
  "eslint-config-prettier": "^10.1.1",
73
71
  "eslint-plugin-prettier": "^5.2.3",
74
- "jest": "^29.7.0",
72
+ "jest": "^30.2.0",
73
+ "mongoose": "^8.19.3",
75
74
  "prettier": "^3.5.3",
75
+ "rxjs": "^7.8.2",
76
76
  "source-map-support": "^0.5.21",
77
77
  "supertest": "^7.0.0",
78
- "ts-jest": "^29.2.6",
78
+ "ts-jest": "^29.4.6",
79
79
  "ts-loader": "^9.5.2",
80
- "ts-node": "^10.9.2",
80
+ "ts-node": "^1.7.1",
81
81
  "tsconfig-paths": "^4.2.0",
82
- "typescript": "^5.8.2",
83
- "env-cmd": "^10.1.0"
82
+ "typescript": "^5.8.2"
84
83
  },
85
84
  "jest": {
86
85
  "moduleFileExtensions": [
package/logs/app.log DELETED
@@ -1,9 +0,0 @@
1
- "test"
2
- {"systemTimestamp":"04/12/2025 11:54:51.774","logType":"Summary","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764824091766470","tid":"process.env.COMPONENT_NAME_affe0837-838a-4e59-aafb-481a35331ca6","cmdName":"undefined","resultCode":"50099","resultDesc":"An unknown error has occurred.","reqTimestamp":"04/12/2025 11:54:51.766","resTimestamp":"04/12/2025 11:54:51.773","usageTime":7.219,"custom":null}
3
- {"systemTimestamp":"04/12/2025 11:54:51.777","logType":"Detail","logLevel":"INFO","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764824091766470","tid":"process.env.COMPONENT_NAME_affe0837-838a-4e59-aafb-481a35331ca6","custom1":{"requestObject":"{\"method\":\"GET\",\"url\":\"/\",\"headers\":{\"host\":\"localhost:4201\",\"connection\":\"keep-alive\",\"cache-control\":\"max-age=0\",\"sec-ch-ua\":\"\\\"Chromium\\\";v=\\\"142\\\", \\\"Google Chrome\\\";v=\\\"142\\\", \\\"Not_A Brand\\\";v=\\\"99\\\"\",\"sec-ch-ua-mobile\":\"?0\",\"sec-ch-ua-platform\":\"\\\"macOS\\\"\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36\",\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\"sec-fetch-site\":\"none\",\"sec-fetch-mode\":\"navigate\",\"sec-fetch-user\":\"?1\",\"sec-fetch-dest\":\"document\",\"accept-encoding\":\"gzip, deflate, br, zstd\",\"accept-language\":\"en-US,en;q=0.9,th;q=0.8\",\"cookie\":\"_ga=GA1.1.199040915.1762854735\",\"if-none-match\":\"W/\\\"c-Lve95gjOVATpfV8EL5X4nxwjKHE\\\"\",\"x-ais-orderref\":\"process.env.COMPONENT_NAME_affe0837-838a-4e59-aafb-481a35331ca6\"},\"body\":{}}","responseObject":"","activityLog":{"startTime":"2025-12-04T11:54:51.7664700+07:00","endTime":"2025-12-04T11:54:51.7736890+07:00","processTime":7.219}}}
4
- "test"
5
- {"systemTimestamp":"04/12/2025 13:58:00.042","logType":"Summary","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764831480027652","tid":"process.env.COMPONENT_NAME_3c500a64-8033-4439-8a2f-4827515f9dd7","cmdName":"undefined","resultCode":"50099","resultDesc":"An unknown error has occurred.","reqTimestamp":"04/12/2025 13:58:00.027","resTimestamp":"04/12/2025 13:58:00.035","usageTime":8.031,"custom":null}
6
- {"systemTimestamp":"04/12/2025 13:58:00.046","logType":"Detail","logLevel":"INFO","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764831480027652","tid":"process.env.COMPONENT_NAME_3c500a64-8033-4439-8a2f-4827515f9dd7","custom1":{"requestObject":"{\"method\":\"GET\",\"url\":\"/\",\"headers\":{\"host\":\"localhost:4201\",\"connection\":\"keep-alive\",\"sec-ch-ua\":\"\\\"Chromium\\\";v=\\\"142\\\", \\\"Google Chrome\\\";v=\\\"142\\\", \\\"Not_A Brand\\\";v=\\\"99\\\"\",\"sec-ch-ua-mobile\":\"?0\",\"sec-ch-ua-platform\":\"\\\"macOS\\\"\",\"upgrade-insecure-requests\":\"1\",\"user-agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36\",\"accept\":\"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7\",\"sec-fetch-site\":\"none\",\"sec-fetch-mode\":\"navigate\",\"sec-fetch-user\":\"?1\",\"sec-fetch-dest\":\"document\",\"accept-encoding\":\"gzip, deflate, br, zstd\",\"accept-language\":\"en-US,en;q=0.9,th;q=0.8\",\"cookie\":\"_ga=GA1.1.199040915.1762854735\",\"if-none-match\":\"W/\\\"c-Lve95gjOVATpfV8EL5X4nxwjKHE\\\"\",\"x-ais-orderref\":\"process.env.COMPONENT_NAME_3c500a64-8033-4439-8a2f-4827515f9dd7\"},\"body\":{}}","responseObject":"","activityLog":{"startTime":"2025-12-04T13:58:00.0276520+07:00","endTime":"2025-12-04T13:58:00.0356830+07:00","processTime":8.031}}}
7
- "test"
8
- {"systemTimestamp":"04/12/2025 13:58:00.218","logType":"Summary","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764831480215596","tid":"process.env.COMPONENT_NAME_79ec35d3-4bc2-4495-bd39-3b977bfcf5a0","cmdName":"undefined","resultCode":"40400","resultDesc":"The requested operation could not be found.","reqTimestamp":"04/12/2025 13:58:00.215","resTimestamp":"04/12/2025 13:58:00.218","usageTime":2.713,"custom":null}
9
- {"systemTimestamp":"04/12/2025 13:58:00.219","logType":"Detail","logLevel":"INFO","namespace":"process.env.APP_NAME","applicationName":"process.env.COMPONENT_NAME","containerId":"MacBook-Air-khxng-MaOhnnn.local","sessionId":"1764831480215596","tid":"process.env.COMPONENT_NAME_79ec35d3-4bc2-4495-bd39-3b977bfcf5a0","custom1":{"requestObject":"{\"method\":\"GET\",\"url\":\"/favicon.ico\",\"headers\":{\"host\":\"localhost:4201\",\"connection\":\"keep-alive\",\"sec-ch-ua-platform\":\"\\\"macOS\\\"\",\"user-agent\":\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36\",\"sec-ch-ua\":\"\\\"Chromium\\\";v=\\\"142\\\", \\\"Google Chrome\\\";v=\\\"142\\\", \\\"Not_A Brand\\\";v=\\\"99\\\"\",\"sec-ch-ua-mobile\":\"?0\",\"accept\":\"image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8\",\"sec-fetch-site\":\"same-origin\",\"sec-fetch-mode\":\"no-cors\",\"sec-fetch-dest\":\"image\",\"referer\":\"http://localhost:4201/\",\"accept-encoding\":\"gzip, deflate, br, zstd\",\"accept-language\":\"en-US,en;q=0.9,th;q=0.8\",\"cookie\":\"_ga=GA1.1.199040915.1762854735\",\"x-ais-orderref\":\"process.env.COMPONENT_NAME_79ec35d3-4bc2-4495-bd39-3b977bfcf5a0\"},\"body\":{}}","responseObject":"{\"message\":\"Cannot GET /favicon.ico\",\"error\":\"Not Found\",\"statusCode\":404}","activityLog":{"startTime":"2025-12-04T13:58:00.2155960+07:00","endTime":"2025-12-04T13:58:00.2183090+07:00","processTime":2.713}}}