Download the PHP package super-kernel/logger without Composer
On this page you can find all versions of the php package super-kernel/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download super-kernel/logger
More information about super-kernel/logger
Files in super-kernel/logger
Package logger
Short Description The logger component for super-kernel.
License MIT
Informations about the package logger
English | 中文文档
Overview
super-kernel/logger is the official logging component of SuperKernel, providing two types of logging capabilities:
-
Standard Output Logging: By default, it outputs to the terminal (
stdout) via theLoggerclass, suitable for development and CLI environments. - Monolog Extended Logging: Automatically creates developer-defined multichannel log instances via
LoggerFactory, supporting various Handlers such as file, network, and queues.
This component conforms to the psr/log standard and is seamlessly integrated with SuperKernel's dependency injection system and configuration system.
Installation
Configuration
This component only scans properties with
publicvisibility in classes annotated with#[Configuration(LoggerConfigInterface::class)].
Single handler configuration
Multiple handler configurations
🚀 Example
Standard output log
Standard output log
Advanced
The logs output by framework components are standard output logs. We generally believe that such log output does not need to be recorded, but developers who have such needs can consider the following method:
nohup
After exiting the terminal, the process continues to run in the background, and standard output logs will be written to output.log.
setsid
Similar to nohup, but it does not inherit the original terminal's session ID, thus more completely detaching from the controlling terminal.
Override the LoggerInterface class provider
More usage
Please visit Visit monolog/monolog to learn more.
All versions of logger with dependencies
psr/log Version ^3.0
monolog/monolog Version ^3.9
symfony/console Version ^7.3
super-kernel/contract Version *