Some Loggig changes

This commit is contained in:
Václav Španinger 2020-07-28 11:29:36 +02:00
parent 70ef954b64
commit 27c306cba7
3 changed files with 4 additions and 6 deletions

View File

@ -56,7 +56,7 @@ class ErrorHandler {
$apiLogManager = new LogManager('../logs/apache/'. date("Y-m-d").'.log');
$apiLogManager->setLevel(LOGLEVEL);
$apiLogManager->write("[APACHE] ERROR\n" . json_encode($message, JSON_PRETTY_PRINT), LogRecordTypes::INFO);
$apiLogManager->write("[APACHE]\n" . json_encode($message, JSON_PRETTY_PRINT), LogRecordTypes::ERROR);
}
}
set_exception_handler("ErrorHandler::exception");
@ -85,8 +85,6 @@ ini_set('session.cookie_path', str_replace("login", "", str_replace('https://' .
ini_set('session.cookie_secure', '1');
mb_internal_encoding ("UTF-8");
Debugger::flag('dbconnect');
//D B Conector
Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);

View File

@ -9,8 +9,8 @@ class EndpointsApi extends ApiController{
//Log
$logManager = new LogManager();
$apiLogManager->setLevel(LOGLEVEL);
$apiLogManager = new LogManager('../logs//api/'. date("Y-m-d").'.log');
$logManager->setLevel(LOGLEVEL);
$logManager = new LogManager('../logs/api/'. date("Y-m-d").'.log');
//Token Checks
if ($obj['token'] == null || !isset($obj['token'])) {

View File

@ -3,7 +3,7 @@
class RoomsApi extends ApiController{
public function default(){
//$this->requireAuth();
$this->requireAuth();
$response = [];
$roomIds = [];
$roomsData = RoomManager::getRoomsDefault();