public function log($level,
$message, array
$context =
[]): bool
{ if (is_numeric($level)) { $level =
array_search((int) $level,
$this->logLevels, true
);
} // Is the level a valid level?
if (!
array_key_exists($level,
$this->logLevels
)) { throw LogException::
forInvalidLogLevel($level);
} // Does the app want to log this right now?
if (!
in_array($level,
$this->loggableLevels, true
)) { return false;
} // Parse our placeholders
$message =
$this->
interpolate($message,
$context);
if ($this->cacheLogs
) {