���Root Mod By V1rus_Alfa
User / IP
:
216.73.217.78
Host / Server
:
195.214.235.115 / npln.ir
System
:
Linux damavand.pws-dns.net 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Command
|
Upload
|
Mass Deface
|
Create
:
/
home2
/
cutunixc
/
repositories
/
npln
/
vendor
/
psy
/
psysh
/
src
/
Logger
/
Viewing: CallbackLogger.php
<?php /* * This file is part of Psy Shell. * * (c) 2012-2026 Justin Hileman * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Psy\Logger; /** * Callback logger. * * A simple logger that calls a callback with the log kind and data. */ class CallbackLogger { private $callback; /** * @param callable $callback Callback to invoke with (string $kind, string $data) */ public function __construct(callable $callback) { $this->callback = $callback; } /** * Log a message. * * @param string $level Log level * @param string $message Log message * @param array $context Context data */ public function log(string $level, string $message, array $context = []): void { // Determine the kind from the message switch ($message) { case 'PsySH input': $kind = 'input'; break; case 'PsySH command': $kind = 'command'; break; case 'PsySH execute': $kind = 'execute'; break; default: $kind = 'unknown'; break; } // Extract the data from context $data = $context[$kind] ?? $context['code'] ?? ''; \call_user_func($this->callback, $kind, $data); } }
Coded With 💗 by
0x6ick Mod By V1rus_Alfa