Skip to content

Firefly III: a personal finances manager

Make audit log configurable.

James Coleee3ef4b8cc55
diff --git a/.env.example b/.env.example
index 2fc8fb386f..3676972563 100644
--- a/.env.example
+++ b/.env.example
@@ -53,6 +53,13 @@ LOG_CHANNEL=stack
# nothing will get logged, ever.
APP_LOG_LEVEL=notice
+#
+# Firefly III keeps track of specific (security) related events in an audit log.
+# These are stored on the drive, but in case of Docker can best be sent to 'stdout'.
+#
+AUDIT_LOG_CHANNEL=daily
+
+
# 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/support/faq
# If you use Docker or similar, you can set these variables from a file by appending them with _FILE
diff --git a/config/logging.php b/config/logging.php
index ef53668a32..932421f073 100644
--- a/config/logging.php
+++ b/config/logging.php
@@ -78,7 +78,7 @@ return [
'days' => 7,
],
'audit' => [
- 'driver' => 'daily',
+ 'driver' => envNonEmpty('AUDIT_LOG_CHANNEL', 'daily'),
'path' => storage_path('logs/ff3-audit.log'),
'tap' => [AuditLogger::class],
'level' => 'info',