\TamerLib\Classes\ > RedisServer > start()
now starts the server with a matching logging level to net.nosial.loglib
This commit is contained in:
parent
264fea0c7c
commit
cf912dad6d
2 changed files with 19 additions and 1 deletions
|
@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [2.0.2] - Unreleased
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- `\TamerLib\Classes\ > RedisServer > start()` now starts the server with a matching logging level to `net.nosial.loglib`
|
||||||
|
|
||||||
|
|
||||||
## [2.0.1] - 2023-06-30
|
## [2.0.1] - 2023-06-30
|
||||||
|
|
||||||
Minor bugfixes and improvements.
|
Minor bugfixes and improvements.
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
namespace TamerLib\Classes;
|
namespace TamerLib\Classes;
|
||||||
|
|
||||||
|
use LogLib\Abstracts\LevelType;
|
||||||
use LogLib\Log;
|
use LogLib\Log;
|
||||||
use Redis;
|
use Redis;
|
||||||
use RedisException;
|
use RedisException;
|
||||||
|
@ -74,7 +75,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::verbose(Utilities::getName(), 'Starting server on port ' . $this->configuration->getPort() . '.');
|
Log::verbose(Utilities::getName(), 'Starting server on port ' . $this->configuration->getPort() . '.');
|
||||||
$this->server_process = new Process([$this->cmd, '--port', $this->configuration->getPort()]);
|
|
||||||
|
$log_level = match (\LogLib\Classes\Utilities::getLogLevel())
|
||||||
|
{
|
||||||
|
LevelType::Warning, LevelType::Error => 'warning',
|
||||||
|
LevelType::Verbose => 'verbose',
|
||||||
|
LevelType::Debug => 'debug',
|
||||||
|
default => 'notice',
|
||||||
|
};
|
||||||
|
|
||||||
|
$this->server_process = new Process([
|
||||||
|
$this->cmd, '--port', $this->configuration->getPort(), '--loglevel', $log_level
|
||||||
|
]);
|
||||||
$this->server_process->start();
|
$this->server_process->start();
|
||||||
|
|
||||||
// Use a redis client and ping the server until it responds.
|
// Use a redis client and ping the server until it responds.
|
||||||
|
|
Loading…
Add table
Reference in a new issue