Skip to content

Commit f6f7f16

Browse files
authored
Merge pull request CloudBotIRC#258 from linuxdaemon/gonzobot+console-info
Add option to disable logging info messages to console
2 parents 8dcb883 + b6b13ef commit f6f7f16

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

cloudbot/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def _setup():
2525
logging_config = {}
2626

2727
file_log = logging_config.get("file_log", False)
28+
console_level = "INFO" if logging_config.get("console_log_info", True) else "WARNING"
2829

2930
global logging_dir
3031
logging_dir = os.path.join(os.path.abspath(os.path.curdir), "logs")
@@ -50,7 +51,7 @@ def _setup():
5051
"console": {
5152
"class": "logging.StreamHandler",
5253
"formatter": "brief",
53-
"level": "INFO",
54+
"level": console_level,
5455
"stream": "ext://sys.stdout"
5556
}
5657
},

config.default.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"show_motd": true,
129129
"show_server_info": true,
130130
"raw_file_log": false,
131-
"file_log": true
131+
"file_log": true,
132+
"console_log_info": true
132133
}
133134
}

0 commit comments

Comments
 (0)