Some Loggig changes
This commit is contained in:
parent
70ef954b64
commit
27c306cba7
@ -56,7 +56,7 @@ class ErrorHandler {
|
|||||||
|
|
||||||
$apiLogManager = new LogManager('../logs/apache/'. date("Y-m-d").'.log');
|
$apiLogManager = new LogManager('../logs/apache/'. date("Y-m-d").'.log');
|
||||||
$apiLogManager->setLevel(LOGLEVEL);
|
$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");
|
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');
|
ini_set('session.cookie_secure', '1');
|
||||||
mb_internal_encoding ("UTF-8");
|
mb_internal_encoding ("UTF-8");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Debugger::flag('dbconnect');
|
Debugger::flag('dbconnect');
|
||||||
//D B Conector
|
//D B Conector
|
||||||
Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
|
Db::connect (DBHOST, DBUSER, DBPASS, DBNAME);
|
||||||
|
@ -9,8 +9,8 @@ class EndpointsApi extends ApiController{
|
|||||||
|
|
||||||
//Log
|
//Log
|
||||||
$logManager = new LogManager();
|
$logManager = new LogManager();
|
||||||
$apiLogManager->setLevel(LOGLEVEL);
|
$logManager->setLevel(LOGLEVEL);
|
||||||
$apiLogManager = new LogManager('../logs//api/'. date("Y-m-d").'.log');
|
$logManager = new LogManager('../logs/api/'. date("Y-m-d").'.log');
|
||||||
|
|
||||||
//Token Checks
|
//Token Checks
|
||||||
if ($obj['token'] == null || !isset($obj['token'])) {
|
if ($obj['token'] == null || !isset($obj['token'])) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
class RoomsApi extends ApiController{
|
class RoomsApi extends ApiController{
|
||||||
|
|
||||||
public function default(){
|
public function default(){
|
||||||
//$this->requireAuth();
|
$this->requireAuth();
|
||||||
$response = [];
|
$response = [];
|
||||||
$roomIds = [];
|
$roomIds = [];
|
||||||
$roomsData = RoomManager::getRoomsDefault();
|
$roomsData = RoomManager::getRoomsDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user