Log level 2.4+
📝 Name: logLevel · 🖥️ Option: --log-level · 🐝 Default: error
The log level used to determine which crawling results to log.
INFO
This configuration option is only respected if the logFile configuration option is set.
Available log levels
According to PSR-3, the following log levels are available:
emergencyalertcriticalerror(default; enables logging of failed crawls)warningnoticeinfo(enables logging of successful crawls)debug
Log failed crawls: error
By default, only failed crawls are logged. You can explicitly configure this by setting the log level to error.
bash
./cache-warmup.phar --log-level errorjson
{
"logLevel": "error"
}php
use EliasHaeussler\CacheWarmup;
return static function (CacheWarmup\Config\CacheWarmupConfig $config) {
$config->setLogLevel(CacheWarmup\Log\LogLevel::ERROR);
return $config;
};yaml
logLevel: errorbash
CACHE_WARMUP_LOG_LEVEL="error"Log all crawls: info
You can also set the log level to info to log successful crawls as well.
bash
./cache-warmup.phar --log-level infojson
{
"logLevel": "info"
}php
use EliasHaeussler\CacheWarmup;
return static function (CacheWarmup\Config\CacheWarmupConfig $config) {
$config->setLogLevel(CacheWarmup\Log\LogLevel::INFO);
return $config;
};yaml
logLevel: infobash
CACHE_WARMUP_LOG_LEVEL="info"