Logging System

The documentation is constantly evolving and updated alongside the project's progress. Since it is developed in parallel with the code, some sections may temporarily refer to earlier versions of the system-these are gradually adapted to the current state of the application. If you notice any outdated information, please report it or open an Issue / Pull Request.

Documentation

# Logging System

# Overview

The logging system provides a standard interface for application logging.

It follows a structure similar to PSR-3.


# Logger Interface

use Psr\Log\LoggerInterface;

# Log Levels

LevelDescription
----------------------------------
emergencySystem unusable
alertImmediate action required
criticalCritical conditions
errorRuntime errors
warningWarnings
noticeNormal but significant
infoInformational
debugDebug-level messages

# Example Usage

$logger->info('User logged in', [
    'user_id' => 1
]);

# Context Data

Supports placeholders:

$logger->info(
    'User {id} logged in',
    ['id' => 1]
);

# Generic Log Method

$logger->log('info', 'Message');

# Best Practices

  • Use appropriate log levels
  • Avoid logging sensitive data
  • Use structured context

# Integration

The framework logger implements the PSR-3 logger contract. Applications and platform modules can inject it into HTTP clients, error handling, and monitoring components.