https://github.com/stechstudio/logging
Our logging package for Laravel Stacks
https://github.com/stechstudio/logging
Last synced: 2 days ago
JSON representation
Our logging package for Laravel Stacks
- Host: GitHub
- URL: https://github.com/stechstudio/logging
- Owner: stechstudio
- Created: 2019-02-26T00:16:21.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-03-03T13:39:52.000Z (over 1 year ago)
- Last Synced: 2025-10-28T15:35:49.379Z (8 months ago)
- Language: PHP
- Size: 33.2 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Install
First, add the private repository to your `composer.json` file like so:
```json
"repositories": [
{
"type": "vcs",
"url": "git@github.com:stechstudio/logging.git"
}
]
```
Then you can just run composer:
```
composer require stechstudio/logging
```
## Configuration
Edit your `config/logging.php` to look like this:
```php
env('LOG_CHANNEL', 'stack'),
/*
|--------------------------------------------------------------------------
| Log Channels
|--------------------------------------------------------------------------
|
| Here you may configure the log channels for your application. Out of
| the box, Laravel uses the Monolog PHP logging library. This gives
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "monolog",
| "custom", "stack"
|
*/
'channels' => [
'lambda_stack' => [
'driver' => 'stack',
'channels' => ['stderr', 'logentries'],
'ignore_exceptions' => false,
],
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
'driver' => 'single',
'tap' => [STS\Logging\MonologTap::class],
'path' => '/var/log/local/' . strtolower(env('APP_NAME')) . '.log',
'permission' => 0664,
'level' => env('LOG_LEVEL', 'debug'),
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'tap' => [STS\Logging\MonologTap::class],
'with' => [
'stream' => 'php://stderr',
],
],
'logentries' => [
'driver' => 'monolog',
'level' => env('LOG_LEVEL', 'debug'),
'handler' => LogEntriesHandler::class,
'tap' => [MonologTap::class],
'with' => [
'token' => env('LOGENTRIES_TOKEN'),
],
],
'syslog' => [
'driver' => 'syslog',
'level' => env('LOG_LEVEL', 'debug'),
],
'errorlog' => [
'driver' => 'errorlog',
'level' => env('LOG_LEVEL', 'debug'),
],
],
];
```