HEX
Server: LiteSpeed
System: Linux server315.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
User: globfdxw (6114)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/globfdxw/www/wp-content/plugins/give/src/Framework/Exceptions/Traits/Loggable.php
<?php

namespace Give\Framework\Exceptions\Traits;

trait Loggable
{
    /**
     * Gets the Exception::getMessage() method
     *
     * @since 2.11.1
     */
    abstract public function getMessage();

    /**
     * Returns the human-readable log message
     *
     * @since 2.11.1
     */
    public function getLogMessage(): string
    {
        return $this->getMessage();
    }

    /**
     * Returns an array with the basic context details
     *
     * @since 2.21.0 Log meaningful data instead of entire exception object.
     * @since 2.11.1
     *
     * @return array
     */
    public function getLogContext(): array
    {
        return [
            'category' => 'Uncaught Exception',
            'exception' => [
                'File' => basename($this->getFile()),
                'Line' => $this->getLine(),
                'Message' => $this->getMessage(),
                'Code' => $this->getCode()
            ]
        ];
    }
}