From 6ca471386daf5011249e03a84400114002c947b9 Mon Sep 17 00:00:00 2001 From: Miguel N Date: Sun, 27 Dec 2020 19:28:48 +0000 Subject: [PATCH] Create log file if it doesn't exist yet --- src/Bot/init.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Bot/init.php b/src/Bot/init.php index 464c926..f214552 100644 --- a/src/Bot/init.php +++ b/src/Bot/init.php @@ -14,6 +14,11 @@ $dotenv->required('CAT_API_KEY')->notEmpty(); define('PROJECT_ROOT', realpath(__DIR__ . '/../../')); +if (!file_exists(PROJECT_ROOT . 'Storage/Logs/bot.log')) +{ + touch(PROJECT_ROOT . 'Storage/Logs/bot.log'); +} Analog::handler(File::init(PROJECT_ROOT . 'Storage/Logs/bot.log')); + Analog::info("Finished intializing configuration and dependencies.");