feat(diagnostics): add health engine

This commit is contained in:
sdarbinyan
2026-07-10 13:34:25 +04:00
parent 7ecb19cb1a
commit 7161a81068
16 changed files with 1274 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
import { Injectable, signal } from '@angular/core';
import { DiagnosticEntry } from '../models/diagnostics.model';
@Injectable({ providedIn: 'root' })
export class DiagnosticsLoggerService {
private readonly logsState = signal<DiagnosticEntry[]>([]);
readonly logs = this.logsState.asReadonly();
log(entry: DiagnosticEntry): void {
this.logsState.update(current => [entry, ...current].slice(0, 300));
}
clear(): void {
this.logsState.set([]);
}
}