fix(logger): batch fix audit-logger, circular meta, and sync callers
- Make logAudit and closeAuditLogger synchronous (were async for no reason) - Set audit-logger silent:true initially, enable on applyAuditConfig() - Add try-catch for circular references in consoleFormat meta JSON - Update all callers to remove unnecessary await/.catch() on sync functions - Add comment to shared.ts explaining acceptable sync FS usage - Fix audit-logger test for sync closeAuditLogger Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -204,8 +204,8 @@ describe('Audit Logger - Real File Integration', () => {
|
||||
it('should close audit logger without errors', async () => {
|
||||
const { closeAuditLogger } = await import('../../src/main/services/logger/audit-logger')
|
||||
|
||||
// Should resolve without throwing
|
||||
await expect(closeAuditLogger()).resolves.toBeUndefined()
|
||||
// Should complete without throwing
|
||||
expect(() => closeAuditLogger()).not.toThrow()
|
||||
})
|
||||
|
||||
it('should handle special characters in fields', async () => {
|
||||
|
||||
Reference in New Issue
Block a user