Skip to content
This repository was archived by the owner on Jan 5, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .env.example
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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=

Expand Down
2 changes: 1 addition & 1 deletion composer.json
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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": [{
Expand Down
69 changes: 69 additions & 0 deletions config/logging.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?php

return [

/*
|--------------------------------------------------------------------------
| Default Log Channel
|--------------------------------------------------------------------------
|
| This option defines the default log channel that gets used when writing
| messages to the logs. The name specified in this option should match
| one of the channels defined in the "channels" configuration array.
|
*/

'default' => 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'
]
]
];