nextrans-logger 0.1.10 → 0.1.11

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/lib/index.cjs CHANGED
@@ -16,9 +16,7 @@ function formatMessage(log, env) {
16
16
  const date = newDate.getDate();
17
17
  const time = newDate.toTimeString();
18
18
  const timestamp = `${year}-${month}-${date} ${time}`;
19
- message.push(`[${(log === null || log === void 0 ? void 0 : log.timestamp) || timestamp}]`);
20
- message.push(`[${(_a = (env || 'Staging')) === null || _a === void 0 ? void 0 : _a.toUpperCase()}]`);
21
- message.push(`${log.level.toUpperCase()}:`);
19
+ message.push(`[${(log === null || log === void 0 ? void 0 : log.timestamp) || timestamp}][${(_a = (env || 'Staging')) === null || _a === void 0 ? void 0 : _a.toUpperCase()}][${log.level}]:`);
22
20
  if (typeof log === 'string') {
23
21
  message.push(log);
24
22
  }
package/lib/index.js CHANGED
@@ -10,9 +10,7 @@ function formatMessage(log, env) {
10
10
  const date = newDate.getDate();
11
11
  const time = newDate.toTimeString();
12
12
  const timestamp = `${year}-${month}-${date} ${time}`;
13
- message.push(`[${log?.timestamp || timestamp}]`);
14
- message.push(`[${(env || 'Staging')?.toUpperCase()}]`);
15
- message.push(`${log.level.toUpperCase()}:`);
13
+ message.push(`[${log?.timestamp || timestamp}][${(env || 'Staging')?.toUpperCase()}][${log.level}]:`);
16
14
  if (typeof log === 'string') {
17
15
  message.push(log);
18
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nextrans-logger",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "Logging for nextrans app service",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",