Where can I found the log of the sentry service?

I am running a local sentry server. Where can I found the sentry service logs?

1 Like

Sentry processes always log to stderr and stdout. So it’s up to you to collect them somewhere and do something with them. Sentry itself doesn’t write to a file anywhere.

1 Like

Thanks @matt for your answer! I see. I am using systemd (Centos 7) in order to start/stop Sentry. I am not an expert in setting up the system services. I was wandering if you know if there is a setting for systemd to write the stderr and stdout in a file. I tried with “ExecStart=/www/sentry/bin/sentry run cron >> /tmp/sentry_log.log”, but it doesn’t work.

I’m not sure tbh. I don’t know much about systemd offhand, but I assume this is easy to figure out by checking some docs.

1 Like

Ok. Thanks for the answer. I will check the docs.

Unfortunately, the recommended way of putting the log in the specific location using the systemd doesn’t work with Sentry:
ExecStart=/www/sentry/bin/sentry run web >> /var/log/sentry.log
It takes the >> /var/log/sentry.log as sentry arguments.
But, I configure the standard error and output to syslog and console:

Description=Sentry Main Service

ExecStart=/www/sentry/bin/sentry run web


It would be cool to include this in documentation as logs are very important :slight_smile: