Site Overlay

Logging in Mayan EDMS

Whenever I stumbled around excerpts from error logs on the Mayan EDMS user forum, I asked myself, where and how to access these log files on my system. People happily included excerpts from their logs, but almost never gave any hint where to find these logs in a Mayan installation.

After some searching, here’s what I found out: There are (at least) 3 error logs. For debugging Mayan, the most important one is the /opt/mayan-edms/media/error.log.

tl;dnr

In order to have debugging activated…

  1. Log in as administrator into the Mayan GUI
  2. Go to System / Setup / Settings
  3. In the List click on the Settings button of the Logging section
  4. Change the LOGGING_HANDLERS entry from - console to - logfile (not sure what the minus is good for)
  5. The LOGGING_LEVEL entry is normally set to ERROR. Possible values with increasing granularity are ERROR, WARN, INFO and DEBUG.
  6. Reboot your Mayan instance to make sure that the amended settings have been reloaded.

Debug output should now be directed to /opt/mayan-edms/media/error.log.

Less useful log files

Admin GUI of Mayan

The admin GUI of Mayan features a Global error log under the System / Tools section. Still one should not expect too much from this global error log. In the default setting, the only thing included is usually an empty section.

The Global error log from Mayan’s Tools section

Not sure if this Global error log takes its entries from the /opt/mayan-edms/media/error.log.

/var/log/supervisor

Next candidate is the /var/log/supervisor directory. Unfortunately, as the name tells, it’s a log directory for supervisor in general and not for Mayan in particular. Entries in this log are therefore at a much higher level and refer to the function of the supervisor service in general, as the following tail from supervisord.log shows:

Apart from the relatively straightforward named supervisord.log there are a couple of further, rather cryptically named files relating to celery and gunicorn:

None of those logs is particularly helpful if you want to debug a problem that has its roots inside Mayan (like why a search query returns no value or why thumbnails are not displayed in the document overview).