@icd-iot-aicf/nestjs-logger 0.1.11 → 1.0.1

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/logs/app.log ADDED
@@ -0,0 +1,9 @@
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}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icd-iot-aicf/nestjs-logger",
3
- "version": "0.1.11",
3
+ "version": "1.0.1",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -26,30 +26,39 @@
26
26
  "test:cov": "jest --coverage",
27
27
  "test:e2e": "jest --config ./test/jest-e2e.json"
28
28
  },
29
- "dependencies": {
30
- "@nestjs/axios": "^4.0.0",
31
- "@nestjs/common": "^11.0.11",
32
- "@nestjs/config": "^4.0.1",
29
+ "peerDependencies": {
33
30
  "@nestjs/core": "^11.0.11",
31
+ "@nestjs/common": "^11.0.11",
34
32
  "@nestjs/platform-express": "^11.0.11",
35
- "@types/microtime": "^2.1.2",
33
+ "@nestjs/config": "^4.0.1",
34
+ "@nestjs/axios": "^4.0.0",
36
35
  "@willsoto/nestjs-prometheus": "^6.0.2",
37
- "axios": "^1.8.3",
38
- "babel-plugin-transform-imports": "^2.0.0",
39
36
  "class-transformer": "^0.5.1",
40
- "dayjs": "^1.11.13",
41
- "env-cmd": "^10.1.0",
42
- "express": "^4.21.2",
37
+ "mongoose": "^8.0.0",
38
+ "rxjs": "^7.8.2"
39
+ },
40
+ "dependencies": {
41
+ "@types/microtime": "^2.1.2",
42
+ "babel-plugin-transform-imports": "^2.0.0",
43
43
  "microtime": "^3.1.1",
44
44
  "moment-timezone": "^0.5.47",
45
- "mongoose": "^7.8.6",
46
45
  "prom-client": "^15.1.3",
47
- "rxjs": "^7.8.2",
46
+ "axios": "^1.8.3",
47
+ "dayjs": "^1.11.13",
48
48
  "uuid": "^11.1.0",
49
49
  "winston": "^3.17.0",
50
50
  "winston-daily-rotate-file": "^5.0.0"
51
51
  },
52
52
  "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
+ "@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",
53
62
  "@nestjs/cli": "^11.0.5",
54
63
  "@nestjs/schematics": "^11.0.2",
55
64
  "@nestjs/testing": "^11.0.11",
@@ -70,7 +79,8 @@
70
79
  "ts-loader": "^9.5.2",
71
80
  "ts-node": "^10.9.2",
72
81
  "tsconfig-paths": "^4.2.0",
73
- "typescript": "^5.8.2"
82
+ "typescript": "^5.8.2",
83
+ "env-cmd": "^10.1.0"
74
84
  },
75
85
  "jest": {
76
86
  "moduleFileExtensions": [