$_FILES = []
2025-07-24 17:07:22 [::1][-][-][warning][bot.detected] Bot suspicion: nonce mismatch or missing. Error ID: form_interaction_behavior_detected_6882684a116720.46135601; Context: {
    "ip": "::1",
    "userAgent": "Mozilla\/5.0 ...",
    "category": "bot.detected"
}
2025-07-24 17:07:22 [::1][-][-][info][application] $_GET = [
    'r' => 'site/login'
]

$_POST = [
    '_csrf' => 'VCvXmAzFor8A78-EufJqZkp7Pgin081S4iu2u-EU-FwuUY-re4Hr3E-iqentxV1WeAxfWd28nSagGP3zg3HBAw=='
    'LoginForm' => [
        'email' => 'bob@gmail.com'
        'password' => 'password_0'
        'firstname' => ''
        'lastname' => 'ffdf'
        'username' => 'ffff'
        'phone' => ''
        'rememberMe' => '1'
    ]
    'user_interaction_token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3NTMzNzYxNDcsIm5vbmNlIjoiOTJkMzNkYzI3MDJmMmQ4YTdhZWFkZmFhYmMwNjM3YzEifQ.zHfH_ibFkJhtOPk31NpVrZKLvZUtD2c8AF-g79X38wM'
    'login-button' => ''
]

$_FILES = []

code calls:

LogHelper::logBotAction("Fatal honeypot trap filled - bot detected", [
	'ip' => $userIp,
	'userAgent' => $userAgent,
	'attribute' => $attribute,
	'method' => __METHOD__
]);

that uses:
```
declare(strict_types=1);

namespace app\helpers;

use Yii;
use \yii\log\Logger;

class LogHelper
{
	public static function error(string $message, array $context = []): void
	{
		\Yii::$app->appLogger->logError($message, $context);
	}
	
	public static function info(string $message, array $context = []): void
	{
		\Yii::$app->appLogger->logInfo($message, $context);
	}
	
	public static function warning(string $message, array $context = []): void
	{
		\Yii::$app->appLogger->logWarning($message, $context);
	}
	
	public static function debug(string $message, array $context = [], ?string $category = null): void
	{
		\Yii::$app->appLogger->logDebug($message, $context, $category);
	}
	
	public static function logUserAction($userId, string $action, array $data = []): void
	{
		\Yii::$app->appLogger->logUserAction($userId, $action, $data);
	}
	
	public static function logBotAction(string $message, array $data = []): void
	{
		\Yii::$app->appLogger->logBotAction($message, $data);
	}
}
```

and
```
class AppLogger extends Component
{
	const DEFAULT_CATEGORY = 'application';
	
	public bool $enabled;
	
	public string $fallbackLogDir = '@runtime/logs/fallback.log';
	
	private array $_maskVars = ['password', 'password_repeat', 'pass', 'token', 'user_interaction_token', 'attribute'];
	
	public function init()//: __construct()
	{
		parent::init();
		
		// custom code here...
		
		if (!$this->enabled)
		{
			return;
		}
		
		// Ensure the fallback directory is an alias if not already absolute.
		$this->fallbackLogDir = \Yii::getAlias($this->fallbackLogDir);
	}
	
	public function logError(string $message, array $context = []): void
	{
		$this->log(YiiLogger::LEVEL_ERROR, $message, $context);
	}
	
	public function logInfo(string $message, array $context = []): void
	{
		$this->log(YiiLogger::LEVEL_INFO, $message, $context);
	}
	
	public function logWarning(string $message, array $context = []): void
	{
		$this->log(YiiLogger::LEVEL_WARNING, $message, $context);
	}
	
	public function logDebug(string $message, array $context = [], ?string $category = null): void
	{
		if (YII_DEBUG)
		{
			//$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
			$context['category'] = $category ?? ($context['category'] ?? 'debug.mode');
			
			$this->logError($message, array_merge($context, [
				// Be cautious with the amount of backtrace info logged, as it can be verbose.
				//'backtrace' => $backtrace,
			]));
		}
	}
	
	public function logUserAction($userId, string $action, array $data = []): void
	{
		$this->logInfo("User {$userId} performed {$action}", array_merge($data, ['category' => 'user.actions']));
	}
	
	public function logBotAction(string $message, array $data = []): void
	{
		// Filter only non-sensitive data
		$filteredData = [
			'ip' => $data['ip'] ?? 'unknown',
			'userAgent' => $data['userAgent'] ?? 'unknown',
			'category' => 'bot.detected',
		];
		
		$this->logWarning($message, $filteredData);
		//$this->logWarning($message, array_merge($data, ['category' => 'bot.detected']));
	}
	
	public function logReconciliationAction(string $message, array $data = []): void
	{
		// Filter out sensitive data and select relevant context
		$filteredData = [
			'orderId' => $data['orderId'] ?? 'unknown',
			'status' => $data['status'] ?? 'unknown',
			'appValue' => $data['appValue'] ?? null,
			'expectedValue' => $data['expectedValue'] ?? null,
			'category' => 'reconciliation',
		];
		
		// Log a warning about the reconciliation action.
		$this->logWarning($message, $filteredData);
	}
	
	private function log($level, string $message, array $context = []): void
	{
		if ($this->enabled)
		{
			// Mask sensitive fields before JSON encoding
			$maskedContext = $this->maskSensitiveData($context);
				
			$contextString = json_encode($context, JSON_PRETTY_PRINT);
			$logMessage = sprintf("%s; Context: %s", $message, $contextString);
			$category = $context['category'] ?? self::DEFAULT_CATEGORY;
			
			try
			{
				\Yii::getLogger()->log($logMessage, $level, $category);
			}
			// @url https://www.php.net/manual/en/class.throwable.php
			catch (Throwable $e)
			{
				 // Fallback to file logging or another mechanism on failure
				 file_put_contents($this->fallbackLogDir, $logMessage . PHP_EOL, FILE_APPEND);
			}
		}
	}
	
	private function maskSensitiveData(array $data): array
	{
		foreach ($data as $key => &$value)
		{
			if (is_array($value))
			{
				$value = $this->maskSensitiveData($value);
			}
			elseif (in_array(strtolower($key), $this->_maskVars, true))
			{
				$value = '[FILTERED]';
			}
		}
		
		unset($value);
		
		return $data;
	}
}
```

trying to mask out user data.. and its not working