Hi Lukas. Yes I installed the plugin, which gives an error message: “Specified path to log file does not exist: /opt/bitnami/apps/piwik/htdocs/tmp/logs/piwik.log”
Which is correct, since the file doesn’t exist.
Everything is installed by bitnami and uses the user daemon:
drwxr-xr-x 2 daemon daemon 4096 Dec 10 08:02 logs/
I am having the exact same issue. Matomo configuration seem to be correct since everything is working fine, except the fact that the LogViewer is giving me this error “Specified path to log file does not exist: /opt/matomo/tmp/logs/matomo.log”. Matomo.log file indeed doesn’t exist. matomo/tmp file has write permissions and the config.ini.php file is configured correctly to write logs into this file.
I had the same issue. I solved by providing write permission to tmp and logs folder and then I created manually the file matomo.log in tmp/logs/. It worked for me.
diff --git a/plugins/Monolog/config/config.php b/plugins/Monolog/config/config.php
index 4d5e3d15a3..ff60f7c5bd 100644
--- a/plugins/Monolog/config/config.php
+++ b/plugins/Monolog/config/config.php
@@ -38,12 +38,7 @@
$writerNames = array_map('trim', $writerNames);
- $writers = [
- // we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
- // add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
- $c->get(\Monolog\Handler\NullHandler::class),
- ];
-
+ $writers = [];
foreach ($writerNames as $writerName) {
if ($writerName === 'screen' && \Piwik\Common::isPhpCliMode()) {
continue; // screen writer is only valid for web requests
@@ -77,6 +72,12 @@
$writers[] = $c->get(LogCaptureHandler::class);
}
+ // we always add the null handler to make sure there is at least one handler specified. otherwise Monolog will
+ // add a stream handler to stderr w/ a DEBUG log level, which will cause archiving requests to fail.
+ if (empty($writers)) {
+ $writers[] = $c->get(\Monolog\Handler\NullHandler::class);
+ }
+
return array_values($writers);
}),
This should be included in the next Matomo release and fix this issue.