Where are all the Discourse logs

(Sam Saffron) #1

When troubleshooting issues or errors with Discourse it is important you look at your logs:

Various admin logs

The Discourse admin panel contains logs:

  • Email logs for sent, skipped, bounced, received and rejected emails /admin/email
  • Staff action logs at /admin/logs

The logs web UI

Every Discourse instance ships with a GUI log viewer. It is located at:


You should always try this spot first!

The Rails / Unicorn logs

Ruby on Rails contains a very verbose log which is written to disk. Additionally the web server unicorn also logs to disk.

To access:

cd /var/discourse
./launcher enter app
cd /shared/log/rails

This folder contains “unicorn.stderr.log”, “unicorn.stdout.log” and “production.log” in addition to “rotated” log files.

This folder is also available on the host as your app yml should have the lines:

  - volume:
      host: /var/discourse/shared/standalone
      guest: /shared

Meaning that /var/discourse/shared/standalone/log/rails is the home of these log files on the host.

The NGINX logs

Occasionally NGINX logs may contain some extra tips, they are located at:

cd /var/discourse
./launcher enter app
cd /var/log/nginx

The files access.log and error.log will be there as well as a bunch of rotated compressed files

This directory is also available at the host per:

   - volume:
      host: /var/discourse/shared/standalone/log/var-log
      guest: /var/log

At: /var/discourse/shared/standalone/log/var-log/nginx

Redis logs

Although it is uncommon to need to see Redis logs, if you do need them, they go into /var/discourse/shared/standalone/log/var-log/redis; the most recent log entries will be in the current file in that directory.

PostgreSQL logs

If you need to consult the database server logs, they’re in /var/discourse/shared/standalone/log/var-log/postgres; the most recent entries are in the current file in that directory.

Facebook( or Google, Github ) login with an Email existing in my site
How can I access NGINX? (digital ocean one-click install)
Automatic backups are a hit or miss
Mobile Application : login blocked due to authorization request
Bursts of 502 Service Unavailable, pointers to debug
404 after discourse upgrade on subfolder install
Redis RIP on new fresh common install
Admin interface issue caused by CloudFlare rocket loader
Onebox not working after Discourse upgrade
(422) Unprocessable Entity Error - Zapier to Invites via API
Granting badge via admin gives false positive err
What happens if you dont install email on Discourse
Tons of Redis Errors
On edit: Internal Server Error due to plugin
Forked plugin removal causing issues and blank pages
Testing SMTP and watching logs?
Pasted images showing in preview, not in posted/updated
502 bad gateway error
Forum doesn't load after enabling SSL with Let's Encrypt
(Jaleel Akbar) #2

I would like to find out if there are one or more disk files that correspond to the same log messages that appear in the logs web UI (the GUI log viewer). Our company has a requirement to capture those same log messages in a file / flat file, for forwarding and analyzing, etc.