mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-13 16:00:13 +00:00
Change some logging settings.
This commit is contained in:
16
.env.example
16
.env.example
@@ -58,8 +58,20 @@ PAPERTRAIL_PORT=
|
|||||||
APP_LOG_LEVEL=notice
|
APP_LOG_LEVEL=notice
|
||||||
|
|
||||||
# Audit log level.
|
# Audit log level.
|
||||||
# Set this to "emergency" if you dont want to store audit logs, leave on info otherwise.
|
# The audit log is used to log notable Firefly III events on a separate channel.
|
||||||
AUDIT_LOG_LEVEL=info
|
# These log entries may contain sensitive financial information.
|
||||||
|
# The audit log is disabled by default.
|
||||||
|
#
|
||||||
|
# To enable it, set AUDIT_LOG_LEVEL to "info"
|
||||||
|
# To disable it, set AUDIT_LOG_LEVEL to "emergency"
|
||||||
|
AUDIT_LOG_LEVEL=emergency
|
||||||
|
|
||||||
|
#
|
||||||
|
# If you want, you can redirect the audit logs to another channel.
|
||||||
|
# Options are: 'papertrail', 'syslog' OR 'errorlog'
|
||||||
|
#
|
||||||
|
# If you do this, the audit logs may be mixed with normal logs (if they also use the same channel).
|
||||||
|
AUDIT_LOG_CHANNEL=
|
||||||
|
|
||||||
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
# Database credentials. Make sure the database exists. I recommend a dedicated user for Firefly III
|
||||||
# For other database types, please see the FAQ: https://docs.firefly-iii.org/firefly-iii/faq/self-hosted/#i-want-to-use-sqlite
|
# For other database types, please see the FAQ: https://docs.firefly-iii.org/firefly-iii/faq/self-hosted/#i-want-to-use-sqlite
|
||||||
|
@@ -57,7 +57,7 @@ class VersionCheckEventHandler
|
|||||||
$permission = app('fireflyconfig')->get('permission_update_check', -1);
|
$permission = app('fireflyconfig')->get('permission_update_check', -1);
|
||||||
$value = (int)$permission->data;
|
$value = (int)$permission->data;
|
||||||
if (1 !== $value) {
|
if (1 !== $value) {
|
||||||
Log::info('Update check is not enabled.');
|
Log::debug('Update check is not enabled.');
|
||||||
$this->warnToCheckForUpdates($event);
|
$this->warnToCheckForUpdates($event);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -103,7 +103,7 @@ class VersionCheckEventHandler
|
|||||||
$repository = app(UserRepositoryInterface::class);
|
$repository = app(UserRepositoryInterface::class);
|
||||||
$user = $event->user;
|
$user = $event->user;
|
||||||
if (!$repository->hasRole($user, 'owner')) {
|
if (!$repository->hasRole($user, 'owner')) {
|
||||||
Log::debug('User is not admin, done.');
|
Log::notice('User is not admin, done.');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -24,6 +24,15 @@ declare(strict_types=1);
|
|||||||
use FireflyIII\Support\Logging\AuditLogger;
|
use FireflyIII\Support\Logging\AuditLogger;
|
||||||
use Monolog\Handler\SyslogUdpHandler;
|
use Monolog\Handler\SyslogUdpHandler;
|
||||||
|
|
||||||
|
// to correctly redirect audit channel messages the
|
||||||
|
// options for the audit stack are set here, but can be overruled
|
||||||
|
// from an environment variable:
|
||||||
|
$auditChannels = ['audit_daily', 'audit_stdout'];
|
||||||
|
$option = envNonEmpty('AUDIT_LOG_CHANNEL', '');
|
||||||
|
if ('' !== (string)$option) {
|
||||||
|
$auditChannels = [$option];
|
||||||
|
}
|
||||||
|
|
||||||
return [
|
return [
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -53,14 +62,14 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'channels' => [
|
'channels' => [
|
||||||
// default channels for 'stack' and audit logs:
|
// default channels for 'stack' and 'audit' logs are stdout and daily logs.
|
||||||
'stack' => [
|
'stack' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['daily', 'stdout'],
|
'channels' => ['daily', 'stdout'],
|
||||||
],
|
],
|
||||||
'audit' => [
|
'audit' => [
|
||||||
'driver' => 'stack',
|
'driver' => 'stack',
|
||||||
'channels' => ['audit_daily', 'audit_stdout'],
|
'channels' => $auditChannels,
|
||||||
],
|
],
|
||||||
'papertrail' => [
|
'papertrail' => [
|
||||||
'driver' => 'monolog',
|
'driver' => 'monolog',
|
||||||
|
Reference in New Issue
Block a user