diff options
author | David Baker <dave@matrix.org> | 2017-03-01 17:20:37 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2017-03-01 17:20:37 +0000 |
commit | 3557cf34dc011211db1b80016ce09ada86b41ffc (patch) | |
tree | 9ff6c82f81d7a932ffc1d66d677a5cfa65157494 /contrib/example_log_config.yaml | |
parent | WIP support for msisdn 3pid proxy methods (diff) | |
parent | kick jenkins (diff) | |
download | synapse-3557cf34dc011211db1b80016ce09ada86b41ffc.tar.xz |
Merge remote-tracking branch 'origin/develop' into dbkr/msisdn_signin
Diffstat (limited to 'contrib/example_log_config.yaml')
-rw-r--r-- | contrib/example_log_config.yaml | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/contrib/example_log_config.yaml b/contrib/example_log_config.yaml new file mode 100644 index 0000000000..7f7c8ba588 --- /dev/null +++ b/contrib/example_log_config.yaml @@ -0,0 +1,48 @@ +# Example log_config file for synapse. To enable, point `log_config` to it in +# `homeserver.yaml`, and restart synapse. +# +# This configuration will produce similar results to the defaults within +# synapse, but can be edited to give more flexibility. + +version: 1 + +formatters: + fmt: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s' + +filters: + context: + (): synapse.util.logcontext.LoggingContextFilter + request: "" + +handlers: + # example output to console + console: + class: logging.StreamHandler + filters: [context] + + # example output to file - to enable, edit 'root' config below. + file: + class: logging.handlers.RotatingFileHandler + formatter: fmt + filename: /var/log/synapse/homeserver.log + maxBytes: 100000000 + backupCount: 3 + filters: [context] + + +root: + level: INFO + handlers: [console] # to use file handler instead, switch to [file] + +loggers: + synapse: + level: INFO + + synapse.storage: + level: INFO + + # example of enabling debugging for a component: + # + # synapse.federation.transport.server: + # level: DEBUG |