You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPMENT_WORKFLOW.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -303,6 +303,68 @@ pnpm typecheck
303
303
pnpm test
304
304
```
305
305
306
+
## 📝 Logging
307
+
308
+
HotCRM uses **structured logging** via [pino](https://getpino.io). All log output is JSON, making it easy to search, filter, and aggregate in production.
309
+
310
+
### Creating a Logger
311
+
312
+
```typescript
313
+
import { createLogger } from'@hotcrm/core';
314
+
315
+
const logger =createLogger('crm:account');
316
+
```
317
+
318
+
The module name follows the convention `package:module` (e.g. `crm:account`, `finance:invoice`, `ai:cache-manager`).
| Spec Schema Adoption |~95 of ~95 application-level schemas used (~100%) |
@@ -193,8 +193,10 @@ These items were deferred during Phase 13 and have been completed:
193
193
194
194
#### Deferred / Future
195
195
196
-
-[ ]**Structured logging migration** — Replace `console.log` with pino logger across hook files
197
-
-[ ]**Legacy API cleanup** — Remove `db.ts` references and migrate to broker/ObjectQL
196
+
-[x]**Structured logging migration** — Replaced `console.log` with pino logger (`createLogger` from `@hotcrm/core`) across 154 hook/action/service files in all 13 packages; removed emoji from log output; added 9 logger unit tests
197
+
-[x]**CacheManager test isolation** — Added `CacheManager.resetInstance()` for test isolation; 5 dedicated tests
198
+
-[x]**Legacy API cleanup (Phase 1)** — Added `@deprecated` annotations and migration guide to all 13 `db.ts` files; `db` export marked for removal
199
+
-[ ]**Legacy API cleanup (Phase 2)** — Remove `db.ts` exports entirely once all consumers migrated to broker/ObjectQL
198
200
-[ ]**E2E test coverage** — Build API-layer end-to-end tests for Feed API / MCP API
0 commit comments