<?php
require_once __DIR__ . '/../public/SistemModulu/loglar.php';

// Define log levels
define('LOG_LEVEL_INFO', 'INFO');
define('LOG_LEVEL_ERROR', 'ERROR');

// Log function
function logMessage($level, $message) {
    $logFile = __DIR__ . '/../logs/app.log'; // Path to log file
    $timestamp = date('Y-m-d H:i:s');
    $logEntry = "[$timestamp] [$level] $message\n";
    file_put_contents($logFile, $logEntry, FILE_APPEND);
}

// Example usage
logMessage(LOG_LEVEL_INFO, 'Log file initialized.');
