Jul 18, 2020
0
Level 5
Logging Errors with Slack
When my applications are installed via Forge errors logged using LOG_CHANNEL slack have a file path that allows me to identify which installation is having the error message:
/home/forge/*application_url*/vendor/...
With Vapor everything starts with var/task/:
/var/task/vendor/...
Is there a way to add information to the slack error log message? I've search and found no examples of adding more information to the config\logging.php file like this:
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'username' => "Laravel Log",
'emoji' => ':boom:',
'level' => 'error',
// added variable
'message' => env('APP_INSTALL')
],
This didn't work, but it was worth a shot. Any suggestions on how to add information to identify the installation?
Please or to participate in this conversation.