Core Concepts
Telemetry Schema & Severities
Logix structures logs into unified event payloads to enable precise SQL filtering and real-time alert evaluation.
Log Severities & Importance Normalization
| Log Level | Importance | ClickHouse Int | Trigger Conditions |
|---|---|---|---|
| critical / fatal | critical | 4 | Infrastructure crashes, DB connectivity loss, service outage. |
| error | high | 3 | Unhandled exceptions, 5xx server errors, gateway timeouts. |
| warning / warn | medium | 2 | Deprecated API calls, near rate limits, soft retries. |
| info / success | low | 1 | User actions, successful sign-ins, order placements. |
Complete JSON Payload Interface
logger.log({
type: 'audit', // 'info' | 'warning' | 'error' | 'debug' | 'audit' | 'metric'
message: 'User password reset', // Required summary string
appName: 'chefu-web-portal', // Source application identifier
environment: 'production', // 'production' | 'staging' | 'development'
service: 'identity-service', // Microservice component
subsystem: 'auth', // Functional module name
operation: 'reset_password', // Action executed
importance: 'high', // 'critical' | 'high' | 'medium' | 'low' or integer 1-4
track: { // Arbitrary metadata objects
userId: 'usr_8921',
email: 'dev@chefu.co.za',
},
security: { // Audit & Security attributes
ipAddress: '102.132.220.1',
mfaEnabled: true,
},
metrics: { // Measured latency & stats
durationMs: 48,
memoryUsageMb: 124,
},
timestamps: {
event_time: Date.now(), // Optional client Unix timestamp
},
});