<?php
// includes/core/Logger.php

class Logger {
    public static function logUserAction(string $action, string $targetEmail, string $adminEmail): void {
        try {
            $db = Database::getInstance();
            $stmt = $db->prepare("INSERT INTO user_log (action, target_email, admin_email, created_at) VALUES (?, ?, ?, NOW())");
            $stmt->execute([$action, $targetEmail, $adminEmail]);
        } catch (PDOException $e) {
            ErrorLogger::logSqlError("Fehler beim Schreiben in user_log | table: user_log | error: " . $e->getMessage());
        }
    }
}
