move log out of root

This commit is contained in:
tracer 2024-04-23 19:53:57 +02:00
parent 1518deee87
commit a312ad9095
5 changed files with 9 additions and 5 deletions

1
.gitignore vendored
View File

@ -14,3 +14,4 @@
/config.json.prod /config.json.prod
keys.txt keys.txt
/.phpunit.cache /.phpunit.cache
/var/log/*

3
TODO
View File

@ -1,3 +1,6 @@
API Endpint cleanup
API Endpint for version
CLI Version check
check keytype of panel/bindApi check keytype of panel/bindApi
more UNIT tests more UNIT tests

View File

@ -1,8 +1,8 @@
{ {
"name": "24unix/bindapi", "name": "24unix/bindapi",
"description": "manage Bind9 DNS server via REST API", "description": "manage Bind9 DNS server via REST API",
"version": "1.0.8", "version": "1.0.9",
"build_number": "354", "build_number": "355",
"authors": [ "authors": [
{ {
"name": "Micha Espey", "name": "Micha Espey",

View File

@ -2195,7 +2195,7 @@ class CLIController
private function cronRun() private function cronRun()
{ {
$this->logger->debug(message: 'cronRun()'); $this->logger->info(message: 'cronRun()');
$this->domainsUpdate(); $this->domainsUpdate();
} }
} }

View File

@ -38,9 +38,9 @@ class BindAPI
$debug = (new ConfigController(quiet: $quiet))->getConfig(configKey: 'debug'); $debug = (new ConfigController(quiet: $quiet))->getConfig(configKey: 'debug');
if ($debug) { if ($debug) {
$stream = new StreamHandler(stream: dirname(path: __DIR__, levels: 2) . '/bindAPI.log', level: Level::Debug); $stream = new StreamHandler(stream: dirname(path: __DIR__, levels: 2) . '/var/log/bindAPI.debug', level: Level::Debug);
} else { } else {
$stream = new StreamHandler(stream: dirname(path: __DIR__, levels: 2) . '/bindAPI.log', level: Level::Info); $stream = new StreamHandler(stream: dirname(path: __DIR__, levels: 2) . '/var/log/bindAPI.info', level: Level::Info);
} }
$stream->setFormatter(formatter: $formatter); $stream->setFormatter(formatter: $formatter);