code: public function formatMessage($message)
      {
          list($text, $level, $category, $timestamp) = $message;
          $level = Logger::getLevelName($level);
          if (!is_string($text)) {
              // exceptions may not be serializable if in the call stack somewhere is a Closure
              if ($text instanceof \Throwable || $text instanceof \Exception) {
                  $text = (string) $text;
              } else {
                  $text = VarDumper::export($text);
              }
          }
          $traces = [];
          if (isset($message[4])) {
              foreach ($message[4] as $trace) {
                  $traces[] = "in {$trace['file']}:{$trace['line']}";
              }
          }
  
          $prefix = $this->getMessagePrefix($message);
          return $this->getTime($timestamp) . " {$prefix}[$level][$category] $text"
              . (empty($traces) ? '' : "\n    " . implode("\n    ", $traces));
      }
docs: Formats a log message for display as a string.
  @param array $message the log message to be formatted.
  The message structure follows that in [[Logger::messages]].
  @return string the formatted message