ruby-on-railserrbit

Make Errbit write logs


I've just set up an Errbit server in a Docker container. It seems to work well, except I'm not getting any emails. So I thought, it's a Rails project, go to the log directory and look at production.log to see whether the email is getting rendered and sent correctly. And neither directory nor file are there. I found that there is an environment variable ERRBIT_LOG_LOCATION that is either STDOUT(which is the default value) or Syslog::Logger. The default is STDOUT. Does this mean the server output is simply thrown away?

Then I set this to "Syslog::Logger" (the line in my docker-compose.yml file is

- ERRBIT_LOG_LOCATION=Syslog::Logger

just like that), and the container did pick it up after a reboot. Some research said that this means errbit now uses syslogger for logging, so I ought so see something in /var/log/syslog. However, there isn't anything.

I have an nginx running to redirect the domain to the right port (8080). So I checked if there was anything in the nginx logs. Again, nothing. They are empty.

The self.errbit app inside the errbit app tab when I'm logged into my errbit instance is also not present, meaning that the value of the env variable doesn't seem to be a problem.

Personally, I'd like it if errbit logged in the same way as every other Rails app. Or at least, I'd like some kind of logging at all. Is there anything I can do about it?


Solution

  • If you'd like Errbit to log like an ordinary Rails application, you can specify the log file using ERRBIT_LOG_LOCATION: ERRBIT_LOG_LOCATION=./log/production.log (or absolute path)