Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

logging should put all errors in homeserver.log #1781

Closed
sbts opened this issue Jan 8, 2017 · 4 comments
Closed

logging should put all errors in homeserver.log #1781

sbts opened this issue Jan 8, 2017 · 4 comments
Labels
A-Logging Synapse's logs (structured or otherwise). Not metrics. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@sbts
Copy link
Contributor

sbts commented Jan 8, 2017

If the client can't be found synapse fails and reports

Could not find webclient

on the console.
However nothing is reported in homeserver.log except info messages, and they all appear to be normal and expected.

Specifically this occurs on the debian package 0.18.5-1 but I'd expect it to be a general issue.

The same problem also occurs if twisted can't listen on a port (eg: 443)

twisted.internet.error.CannotListenError: Couldn't listen on any:443: [Errno 13] Permission denied.

Appears on the console, but nothing in the logs

@sbts
Copy link
Contributor Author

sbts commented Jan 8, 2017

When run from systemd it is possible to retrieve the console output from a service by running

journalctl -u matrix-synapse -b -e

@richvdh
Copy link
Member

richvdh commented Aug 28, 2019

There are a few errors that happen while we're reading the configuration, which happens before we set up the logging. The solution to that is probably to configure the logger to send all logs to stdout and have journald manage the logs.

Related: #1539 (comment)

@richvdh
Copy link
Member

richvdh commented Jan 8, 2021

It's worth noting that both the cases in the original report are now fixed:

There still remains a class of warnings that are written before the logging is set up - typically these are deprecation warnings etc. We could stack these up until the logging is configured, and write copies to the logs as well/instead, but I'm not entirely sure this is necessary.

@MadLittleMods MadLittleMods added A-Logging Synapse's logs (structured or otherwise). Not metrics. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. labels Jun 11, 2021
@richvdh
Copy link
Member

richvdh commented Jun 16, 2021

I think this is probably as fixed as it's going to be. Logging errors that happen before the logger is set up is hard.

@richvdh richvdh closed this as completed Jun 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Logging Synapse's logs (structured or otherwise). Not metrics. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

3 participants