From cd94c2b8b0e88ea734eccc4893e403c822ab2b8f Mon Sep 17 00:00:00 2001 From: Donald Pakkies Date: Fri, 8 Nov 2019 01:31:44 +0200 Subject: [PATCH 1/3] feat: added a logging config --- config/logging.php | 69 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 config/logging.php diff --git a/config/logging.php b/config/logging.php new file mode 100755 index 0000000..ea5c986 --- /dev/null +++ b/config/logging.php @@ -0,0 +1,69 @@ + env('LOG_CHANNEL', 'single'), + + /* + |-------------------------------------------------------------------------- + | Default Log Handlers + |-------------------------------------------------------------------------- + | + | This option allows you register more than one handler alongside the + | default handler. + | + */ + + 'with_handlers' => [ + // 'slack' + ], + + /* + |-------------------------------------------------------------------------- + | Log Channels + |-------------------------------------------------------------------------- + | + | Here you may configure the log channels for your application. Out of + | the box, Modulus uses the Monolog PHP logging library. This gives + | you a variety of powerful log handlers / formatters to utilize. + | + | Available Drivers: "single", "daily", "slack" + | + */ + + 'channels' => [ + 'single' => [ + 'driver' => 'single', + 'path' => storage_path('logs/modulus.log'), + 'level' => 'debug', + ], + + 'daily' => [ + 'driver' => 'daily', + 'storage' => storage_path('logs/'), + 'name' => 'modulus', + 'level' => 'debug', + 'days' => 14, + ], + + 'slack' => [ + 'driver' => 'slack', + 'token' => env('LOG_SLACK_OAUTH_ACCESS_TOKEN', ''), + 'channel' => env('LOG_SLACK_CHANNEL', ''), + 'username' => 'Modulus Log', + 'emoji' => ':boom:', + 'level' => 'critical' + ] + ] +]; From b5993f7775c4e8ba6e10b5bc77023379f2b9ae64 Mon Sep 17 00:00:00 2001 From: Donald Pakkies Date: Fri, 8 Nov 2019 01:32:12 +0200 Subject: [PATCH 2/3] feat: updated the env file --- .env.example | 5 +++++ 1 file changed, 5 insertions(+) mode change 100644 => 100755 .env.example diff --git a/.env.example b/.env.example old mode 100644 new mode 100755 index 568a70a..3291b43 --- a/.env.example +++ b/.env.example @@ -5,6 +5,11 @@ APP_KEY= APP_DEBUG=false APP_URL=http://localhost +# Slack Logger +LOG_CHANNEL=single +LOG_SLACK_OAUTH_ACCESS_TOKEN= +LOG_SLACK_CHANNEL= + # Bugsnag BUGSNAG_API_KEY= From c11cd3681d1672520717ae5a378db69aec2ca840 Mon Sep 17 00:00:00 2001 From: Donald Pakkies Date: Fri, 8 Nov 2019 01:33:33 +0200 Subject: [PATCH 3/3] feat: version bump --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 composer.json diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 index fa48a4c..80a6d70 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "modulusphp/modulusphp", "description": "A cool API Framework for PHP", "keywords": ["framework", "modulusphp", "modulus", "api", "php"], - "version": "1.9.9.4", + "version": "1.9.9.5", "license": "MIT", "type": "project", "authors": [{