forked from spacejewelhosting/raspberry-bot
Added proper logging and error handling
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
<?php
|
||||
|
||||
use Analog\Analog;
|
||||
use Analog\Handler\File;
|
||||
|
||||
require realpath(__DIR__ . '/../../vendor/autoload.php');
|
||||
|
||||
$dotenv = Dotenv\Dotenv::createImmutable(realpath(__DIR__ . '/../../'));
|
||||
@@ -10,3 +13,7 @@ $dotenv->required('COMMAND_PREFIX')->notEmpty();
|
||||
$dotenv->required('CAT_API_KEY')->notEmpty();
|
||||
|
||||
define('PROJECT_ROOT', realpath(__DIR__ . '/../../'));
|
||||
|
||||
Analog::handler(File::init(PROJECT_ROOT . 'Storage/Logs/bot.log'));
|
||||
|
||||
Analog::info("Finished intializing configuration and dependencies.");
|
||||
|
Reference in New Issue
Block a user