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

Document logging options #7125

Closed
IngwiePhoenix opened this issue Mar 23, 2020 · 3 comments
Closed

Document logging options #7125

IngwiePhoenix opened this issue Mar 23, 2020 · 3 comments
Labels
A-Docs things relating to the documentation A-Logging Synapse's logs (structured or otherwise). Not metrics.

Comments

@IngwiePhoenix
Copy link

Description:

While porting my sqlite based DB to Postgres, I realized just how much log messages Synapse produces and puts down on my disk - so many, that I would not be able to tell if there ever was an error, let alone be able to actually find something like app service communication. It would simply get lost - fast.

The link provided in the log.yaml file that came with the Debian package led to an extensive documentation - unfortunately, it is aimed at developers rather than users who want to set up logging for an application taking advantage of a software using this logging library. Thus, it is very, very confusing. I don't code in python a lot - merely enough that I can write utterly basic programs with it. But above that, I have no clue about Python at all - and I think that learning Python should not be required just to configure logging :)

I would basically like to split my config into:

  • Client-Server API calls (access.log)
  • Federation calls (federation.log)
  • Appservices (appservices.log)
  • Errors (error.log)

However, i have no idea, even after reading the linked document, how to set this scheme up properly...

Since I don't think I will be the only one, I thought I might as well ask for it as a "feature request", although it's more of a "documentation request".

Kind regards,
Ingwie

@richvdh richvdh added A-Docs things relating to the documentation good first issue labels May 19, 2020
@kleph
Copy link
Contributor

kleph commented Oct 29, 2020

As I mentionned in the PR, feel free to comment / suggest !

@richvdh
Copy link
Member

richvdh commented Dec 1, 2020

There are two halves to this issue:

  • better user-facing documentation of how to configure logging. It's true that the document we currently link to (https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema) isn't particularly user-friendly, especially to people unfamiliar with python. It also talks about "configuration dictionaries" in the abstract, rather than dealing specifically with yaml configuration files, so some of the examples are misleading. So this is certainly a reasonable request, and I'd welcome PRs to solve that part of it.

  • The ability to split different categories of logging into different files. It's really unclear what you're expecting here though. Are you envisaging just logging a line per request, in the style of the current "Processed request" lines? Or, say, sending all of the log lines emitted when processing appservice requests to appservices.log? Or something else? Both of these ideas have problems, but it would be helfpul to know what you are envisaging before discussing further.

@clokep
Copy link
Member

clokep commented Dec 10, 2020

I'm going to close this due to lack of response. #8922 was filed with @richvdh's idea above.

@clokep clokep closed this as completed Dec 10, 2020
@MadLittleMods MadLittleMods added the A-Logging Synapse's logs (structured or otherwise). Not metrics. label Dec 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Docs things relating to the documentation A-Logging Synapse's logs (structured or otherwise). Not metrics.
Projects
None yet
Development

No branches or pull requests

5 participants