WIP: Untested, solo caricati file di test

This commit is contained in:
Riccardo Di Dato
2020-09-23 00:05:00 +02:00
parent 0c74df1983
commit d1f4f4c50c
44 changed files with 1034 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
<?php
/*
* lib.inclusion.php
* Author: Riccardo Di Dato
* Creation Date: 03/lug/2020
*/
use ASD\API\Client\HttpClient;
use ASD\Context;
use ASD\Log\FileLogger;
use ASD\Log\GELFLogger;
use ASD\Log\Logger;
use ASD\Log\LogManager;
if (Context::getEnvironment()->get("name") == "local") {
LogManager::addLogger(new FileLogger("core", Context::getEnvironment()->getFilePath("log.core") , Logger::LEVEL_DEBUG));
LogManager::addLogger(new FileLogger("dao", Context::getEnvironment()->getFilePath("log.dao"), Logger::LEVEL_DEBUG));
}
else {
$httpClient = new HttpClient();
LogManager::addLogger(new GELFLogger("core", "http://graylog3:12201/gelf", $httpClient, Logger::LEVEL_NOTICE));
LogManager::addLogger(new GELFLogger("dao", "http://graylog3:12201/gelf", $httpClient, Logger::LEVEL_NOTICE));
}
?>