@andrey4emk/npm-app-back-b24 2.0.11 → 2.0.12

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.
Files changed (2) hide show
  1. package/logs/logs.ts +5 -1
  2. package/package.json +1 -1
package/logs/logs.ts CHANGED
@@ -85,8 +85,12 @@ class LogsAPI {
85
85
  // Получаем цвет для уровня
86
86
  const color = (confLog.get(`${levelStr}.color`) as string) || "\x1b[37m";
87
87
 
88
+ // Формируем время ЧЧ:ММ:СС.мс (2 цифры миллисекунд)
89
+ const now = new Date();
90
+ const time = `${String(now.getHours()).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}:${String(now.getSeconds()).padStart(2, "0")}.${String(now.getMilliseconds()).slice(0, 2).padStart(2, "0")}`;
91
+
88
92
  // Логирование с цветом в консоль
89
- console.log(`${color}${levelStr}: ${messageText}${this.resetColor}`);
93
+ console.log(`${color}${time} ${levelStr}: ${messageText}${this.resetColor}`);
90
94
 
91
95
  if (jsonData) {
92
96
  console.dir(jsonData, { depth: null, colors: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrey4emk/npm-app-back-b24",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "description": "Bitrix24 OAuth helpers for Node.js projects",
5
5
  "main": "index.ts",
6
6
  "type": "module",