This documentation focuses on Drupal application logs, but the same concept could be implemented in PHP applications with the syslog functionality.
Drupal's default installation profile come with (Database Logging)
dblog enabled, which facilitates you to see the logs on the website itself. However for (high traffic) live sites it is not a good idea to keep it enabled.
Luckily there are alternatives:
one of them is built in in Drupal: the
syslog module, and Dropsolid experience cloud has support for it after some configuration.
For more information about the syslog module see the documentation pages.
- Determine the unique identifier that will be used. The format is
dropsolid-platform_<project machine name>_<environment machine name>
- Enable the
syslogmodule through the UI or CLI.
- Go to
/admin/config/development/loggingand configure syslog:
- Syslog Identity: the previously determined unique identifier
- Syslog facility: select
- Syslog format: the default value of this field doesn't contain
severity, which is somewhat a surprise. It makes sense to add it, so it looks like following snippet:
Screenshot of a filled in form as example:
- Ensure these configuration changes are persistent (for D8 and D9: via config export)
The monolog module goes even further than syslog, and allows a more granular configuration for what messages/alerts to log to which location (dblog, syslog, ...)
If you configure monolog to use syslog with the same unique identifier as in the syslog explanation above, you can also download those logs via Dropsolid Platform.
How to download the logs
- On Dropsolid Platform select your project & environment where you want to see logs from.
- On the right hand side under 'Shortcuts' press the 'Logs' button
- The platform will fetch the logs
I want to see logs from before today.
Please contact Dropsolid Support by mailing to support [at] dropsolid.com