sample_log_config.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Log configuration for Synapse.
  2. #
  3. # This is a YAML file containing a standard Python logging configuration
  4. # dictionary. See [1] for details on the valid settings.
  5. #
  6. # [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
  7. version: 1
  8. formatters:
  9. precise:
  10. format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
  11. filters:
  12. context:
  13. (): synapse.logging.context.LoggingContextFilter
  14. request: ""
  15. handlers:
  16. file:
  17. class: logging.handlers.RotatingFileHandler
  18. formatter: precise
  19. filename: /var/log/matrix-synapse/homeserver.log
  20. maxBytes: 104857600
  21. backupCount: 10
  22. filters: [context]
  23. encoding: utf8
  24. console:
  25. class: logging.StreamHandler
  26. formatter: precise
  27. filters: [context]
  28. loggers:
  29. synapse.storage.SQL:
  30. # beware: increasing this to DEBUG will make synapse log sensitive
  31. # information such as access tokens.
  32. level: INFO
  33. root:
  34. level: INFO
  35. handlers: [file, console]
  36. disable_existing_loggers: false