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

Commit

Permalink
Merge pull request #1990 from matrix-org/rav/log_config_comments
Browse files Browse the repository at this point in the history
Add helpful texts to logger config options
  • Loading branch information
richvdh authored Mar 13, 2017
2 parents 2cad971 + 8d86d11 commit 31f3ca1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions contrib/example_log_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ loggers:
synapse:
level: INFO

synapse.storage:
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
level: INFO

# example of enabling debugging for a component:
#
# synapse.federation.transport.server:
Expand Down
12 changes: 7 additions & 5 deletions synapse/config/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
maxBytes: 104857600
backupCount: 10
filters: [context]
level: INFO
console:
class: logging.StreamHandler
formatter: precise
Expand All @@ -56,6 +55,8 @@
level: INFO
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
level: INFO
root:
Expand All @@ -78,10 +79,10 @@ def default_config(self, config_dir_path, server_name, **kwargs):
os.path.join(config_dir_path, server_name + ".log.config")
)
return """
# Logging verbosity level.
# Logging verbosity level. Ignored if log_config is specified.
verbose: 0
# File to write logging to
# File to write logging to. Ignored if log_config is specified.
log_file: "%(log_file)s"
# A yaml python logging config file
Expand All @@ -102,11 +103,12 @@ def add_arguments(cls, parser):
logging_group = parser.add_argument_group("logging")
logging_group.add_argument(
'-v', '--verbose', dest="verbose", action='count',
help="The verbosity level."
help="The verbosity level. Specify multiple times to increase "
"verbosity. (Ignored if --log-config is specified.)"
)
logging_group.add_argument(
'-f', '--log-file', dest="log_file",
help="File to log to."
help="File to log to. (Ignored if --log-config is specified.)"
)
logging_group.add_argument(
'--log-config', dest="log_config", default=None,
Expand Down

0 comments on commit 31f3ca1

Please sign in to comment.