<?php
require_once 'includes/helpers.php';

// Test the logging functions
echo "Testing logging functions...\n";

// Test security logging
log_security_event('TEST', 'Testing security logging functionality', ['test' => true]);
echo "Security log test completed.\n";

// Test error logging
log_error('Testing error logging functionality', ['test' => true]);
echo "Error log test completed.\n";

// Test application logging
log_application_error('Testing application logging functionality', ['test' => true]);
echo "Application log test completed.\n";

// Check if log files were created
$logs_dir = __DIR__ . '/logs/';
echo "\nChecking log files:\n";

$log_files = ['security.log', 'errors.log', 'application.log'];
foreach ($log_files as $log_file) {
    $full_path = $logs_dir . $log_file;
    if (file_exists($full_path)) {
        echo "✓ $log_file exists and has " . filesize($full_path) . " bytes\n";
    } else {
        echo "✗ $log_file does not exist\n";
    }
}

echo "\nLogging test completed successfully!\n";
?>