WIP: Untested, solo caricati file di test
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user