[^\]]+)\] (?P\S+)\.(?P\S+): ?(\|(?\S+)\|)? (?P.*)? (\{(?\S+)\}) ?(\[(?\S+|)\])?/'; //public static string $regex = '/^\[(?P[^\]]+)\] (?P\S+)\.(?P\S+): ?(\|(?\S+)\|)? ?(\((?\S+)\))? (?P.*)? ((?(\{\S+\})|(\[\]))) ((?(\{\S+\})|(\[\])))/'; public static string $regex = '/^\[(?P[^\]]+)\] (?P\S+)\.(?P\S+): ?(\|(?\S+)\|)? ?(\((?\S+)\))? ?(\((?\S+)\))? (?P.*)? ((?(\{.*\})|(\[.*\]))) ((?(\{\S+\})|(\[\])))/'; /** @var array|\string[][] The columns displayed on the frontend, and which data they should display */ public static array $columns = [ ['label' => 'Datetime', 'data_path' => 'datetime'], ['label' => 'Level', 'data_path' => 'level'], ['label' => 'Pid', 'data_path' => 'context.pid'], ['label' => 'Version', 'data_path' => 'context.version'], ['label' => 'Class', 'data_path' => 'context.class'], ['label' => 'Message', 'data_path' => 'context.message'], ['label' => 'Data', 'data_path' => 'context.data'], ]; public function fillMatches(array $matches = []): void { // The parent class already handles the "datetime", "level" and "message" matches. But you're free to assign them yourself. parent::fillMatches($matches); $this->context = [ 'datetime' => $matches['datetime'], 'environment' => $matches['environment'], 'level' => $matches['level'], 'pid' => $matches['pid'], 'version' => $matches['version'], 'class' => $matches['class'], 'message' => $matches['message'], 'data' => $matches['data'], 'extra' => $matches['extra'], ]; } }