mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Add papertrail logging.
This commit is contained in:
parent
aae80c348b
commit
1c9dc9926a
@ -37,9 +37,16 @@ TRUSTED_PROXIES=
|
|||||||
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
# Several other options exist. You can use 'single' for one big fat error log (not recommended).
|
||||||
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
# Also available are 'syslog', 'errorlog' and 'stdout' which will log to the system itself.
|
||||||
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
# A rotating log option is 'daily', creates 5 files that (surprise) rotate.
|
||||||
|
# A cool option is 'papertrail' for cloud logging
|
||||||
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
# Default setting 'stack' will log to 'daily' and to 'stdout' at the same time.
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
|
|
||||||
|
#
|
||||||
|
# Used when logging to papertrail:
|
||||||
|
#
|
||||||
|
PAPERTRAIL_HOST=
|
||||||
|
PAPERTRAIL_PORT=
|
||||||
|
|
||||||
# Log level. You can set this from least severe to most severe:
|
# Log level. You can set this from least severe to most severe:
|
||||||
# debug, info, notice, warning, error, critical, alert, emergency
|
# debug, info, notice, warning, error, critical, alert, emergency
|
||||||
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
|
||||||
|
@ -52,6 +52,7 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'channels' => [
|
'channels' => [
|
||||||
|
// default channels for 'stack' and audit logs:
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['daily', 'stdout'],
|
'channels' => ['daily', 'stdout'],
|
||||||
@ -60,27 +61,38 @@ return [
|
|||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['audit_daily', 'audit_stdout'],
|
'channels' => ['audit_daily', 'audit_stdout'],
|
||||||
],
|
],
|
||||||
|
'scoped' => [
|
||||||
|
'driver' => 'custom',
|
||||||
|
'via' => FireflyIII\Logging\CreateCustomLogger::class,
|
||||||
|
],
|
||||||
|
'papertrail' => [
|
||||||
|
'host' => env('PAPERTRAIL_HOST'),
|
||||||
|
'port' => env('PAPERTRAIL_PORT'),
|
||||||
|
],
|
||||||
|
|
||||||
|
// single laravel log file:
|
||||||
'single' => [
|
'single' => [
|
||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// stdout, used in stack 'stack' by default:
|
||||||
'stdout' => [
|
'stdout' => [
|
||||||
'driver' => 'single',
|
'driver' => 'single',
|
||||||
'path' => 'php://stdout',
|
'path' => 'php://stdout',
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||||
],
|
],
|
||||||
'docker_out' => [
|
|
||||||
'driver' => 'single',
|
// daily, used in stack 'stack' by default:
|
||||||
'path' => 'php://stdout',
|
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
|
||||||
],
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/ff3-' . PHP_SAPI . '.log'),
|
'path' => storage_path('logs/ff3-' . PHP_SAPI . '.log'),
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||||
'days' => 7,
|
'days' => 7,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// the audit log destinations:
|
||||||
'audit_daily' => [
|
'audit_daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/ff3-audit.log'),
|
'path' => storage_path('logs/ff3-audit.log'),
|
||||||
@ -94,26 +106,14 @@ return [
|
|||||||
'tap' => [AuditLogger::class],
|
'tap' => [AuditLogger::class],
|
||||||
'level' => envNonEmpty('AUDIT_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('AUDIT_LOG_LEVEL', 'info'),
|
||||||
],
|
],
|
||||||
'dailytest' => [
|
|
||||||
'driver' => 'daily',
|
|
||||||
'path' => storage_path('logs/test-ff3-' . PHP_SAPI . '.log'),
|
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
|
||||||
'days' => 7,
|
|
||||||
],
|
|
||||||
|
|
||||||
'slack' => [
|
|
||||||
'driver' => 'slack',
|
|
||||||
'url' => env('LOG_SLACK_WEBHOOK_URL'),
|
|
||||||
'username' => 'Firefly III Log Robot',
|
|
||||||
'emoji' => ':boom:',
|
|
||||||
'level' => 'error',
|
|
||||||
],
|
|
||||||
|
|
||||||
|
// syslog destination
|
||||||
'syslog' => [
|
'syslog' => [
|
||||||
'driver' => 'syslog',
|
'driver' => 'syslog',
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// errorlog destination
|
||||||
'errorlog' => [
|
'errorlog' => [
|
||||||
'driver' => 'errorlog',
|
'driver' => 'errorlog',
|
||||||
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
'level' => envNonEmpty('APP_LOG_LEVEL', 'info'),
|
||||||
|
Loading…
Reference in New Issue
Block a user