( ′∀`)σ≡σ☆))Д′)レ(゚∀゚;)ヘ=З=З=Зε≡(ノ´_ゝ`)ノ HEX
HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux mail.thebrand.ai 6.8.0-107-generic #107-Ubuntu SMP PREEMPT_DYNAMIC Fri Mar 13 19:51:50 UTC 2026 x86_64
User: www-data (33)
PHP: 8.3.6
Disabled: NONE
Upload Files
File: /var/www/html/tmpr/../tmpr/../tmpr/../tmpr/../tmpr/../subscriptions/app/Http/Controllers/Logger.php
<?php
namespace App\Http\Controllers;

use Illuminate\Support\Facades\File;

/**  * Logger class  */
class Logger
{
    private $path;
    public function __construct($path=null)
    {
        if(is_null($path)) {
            $this->path = storage_path().'/logs/'.'payment.log';
        } else {
            $this->path = $path;
        }
        if (!(File::exists($this->path))) {
            File::put($this->path, '');
        }
    }

    public function log($type, $text = '', $timestamp = true)
    {
        if(gettype($text) == 'array'){
            $text = json_encode($text);
        }
        if ($timestamp) {
            $datetime = date("d-m-Y H:i:s");
            $text = "$datetime, $type: $text \r\n\r\n";
        } else {
            $text = "$type\r\n\r\n";
        }

        error_log($text, 3, $this->path);
    }

}