private function extractMessageContentData($messageContent)
    {
        $result = null;
        
        if ($messageContent instanceof \Exception) {
            
            // Handle log messages that are exceptions a little more
            // intelligently.
            // 
            // NOTE: In our limited testing, this is never used. Apparently
            //       something is converting the exceptions to strings despite
            //       the statement at
            //       http://www.yiiframework.com/doc-2.0/yii-log-logger.html#$messages-detail
            //       that the data could be an exception instance.
            //
            $result = array(
                'code' => $messageContent->getCode(),
                'exception' => $messageContent->getMessage(),
            );
            
            if ($messageContent instanceof \yii\web\HttpException) {
                $result['statusCode'] = $messageContent->statusCode;
            }
        } elseif ($this->isMultilineString($messageContent)) {
            
            // Split multiline strings (such as a stack trace) into an array
            // for easier reading in the log.
            $result = explode("\n", $messageContent);
            
        } else {
            
            // Use anything else as-is.
            $result = $messageContent;
        }
        
        return $result;
    }