1
0

example_log_config.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Example log_config file for synapse. To enable, point `log_config` to it in
  2. # `homeserver.yaml`, and restart synapse.
  3. #
  4. # This configuration will produce similar results to the defaults within
  5. # synapse, but can be edited to give more flexibility.
  6. version: 1
  7. formatters:
  8. fmt:
  9. format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
  10. filters:
  11. context:
  12. (): synapse.util.logcontext.LoggingContextFilter
  13. request: ""
  14. handlers:
  15. # example output to console
  16. console:
  17. class: logging.StreamHandler
  18. filters: [context]
  19. # example output to file - to enable, edit 'root' config below.
  20. file:
  21. class: logging.handlers.RotatingFileHandler
  22. formatter: fmt
  23. filename: /var/log/synapse/homeserver.log
  24. maxBytes: 100000000
  25. backupCount: 3
  26. filters: [context]
  27. root:
  28. level: INFO
  29. handlers: [console] # to use file handler instead, switch to [file]
  30. loggers:
  31. synapse:
  32. level: INFO
  33. synapse.storage.SQL:
  34. # beware: increasing this to DEBUG will make synapse log sensitive
  35. # information such as access tokens.
  36. level: INFO
  37. # example of enabling debugging for a component:
  38. #
  39. # synapse.federation.transport.server:
  40. # level: DEBUG