ErrorLog - viames/pair GitHub Wiki
Pair framework: ErrorLog
Pair\Models\ErrorLog stores application errors with normalized metadata.
Main methods
getLevelDescription(): string
Lifecycle hooks:
_init()model definitionafterPopulate()post-hydration normalizationbeforePrepareData()pre-serialization shaping
Implementation example
$error = new \Pair\Models\ErrorLog();
$error->level = 3;
$error->message = 'Payment provider timeout';
$error->context = json_encode(['orderId' => 119]);
$error->store();
echo $error->getLevelDescription();
Notes
- Useful for backend diagnostics and operational dashboards.