diff options
author | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-30 19:41:07 +0200 |
---|---|---|
committer | Walter Purcaro <vuolter@users.noreply.github.com> | 2015-04-30 19:41:07 +0200 |
commit | de9ea9603992b69a0bb1c807a6d9489c2ffb3d76 (patch) | |
tree | 7c0df5d269a7de7fdc7eb6620fb4a5f2e2341c3a | |
parent | Merge pull request #11 from ardi69/0.4.10 (diff) | |
download | pyload-de9ea9603992b69a0bb1c807a6d9489c2ffb3d76.tar.xz |
Revert colored console
-rwxr-xr-x | pyload/Core.py | 30 | ||||
-rw-r--r-- | pyload/config/default.conf | 18 |
2 files changed, 12 insertions, 36 deletions
diff --git a/pyload/Core.py b/pyload/Core.py index e833314f0..ad4412a87 100755 --- a/pyload/Core.py +++ b/pyload/Core.py @@ -474,28 +474,7 @@ class Core(object): if self.config.get("log", "color_console"): import colorlog - color_template = self.config.get("log", "color_template") - extra_clr = {} - - if color_template is "mixed": - c_fmt = "%(log_color)s%(asctime)s %(label_log_color)s%(bold)s%(white)s %(levelname)-8s%(reset)s %(log_color)s%(message)s" - clr = { - 'DEBUG' : "cyan" , - 'WARNING' : "yellow", - 'ERROR' : "red" , - 'CRITICAL': "purple", - } - extra_clr = { - 'label': { - 'DEBUG' : "bg_cyan" , - 'INFO' : "bg_green" , - 'WARNING' : "bg_yellow", - 'ERROR' : "bg_red" , - 'CRITICAL': "bg_purple", - } - } - - elif color_template is "label": + if self.config.get("log", "console_mode") == "label": c_fmt = "%(asctime)s %(log_color)s%(bold)s%(white)s %(levelname)-8s%(reset)s %(message)s" clr = { 'DEBUG' : "bg_cyan" , @@ -511,13 +490,10 @@ class Core(object): 'DEBUG' : "cyan" , 'WARNING' : "yellow", 'ERROR' : "red" , - 'CRITICAL': "purple" + 'CRITICAL': "purple", } - console_frm = colorlog.ColoredFormatter(fmt=c_fmt, - datefmt=date_fmt, - log_colors=clr, - secondary_log_colors=extra_clr) + console_frm = colorlog.ColoredFormatter(c_fmt, date_fmt, clr) # Set console formatter console = logging.StreamHandler(sys.stdout) diff --git a/pyload/config/default.conf b/pyload/config/default.conf index b36ed6c9c..9dd36e995 100644 --- a/pyload/config/default.conf +++ b/pyload/config/default.conf @@ -21,19 +21,19 @@ webui - "Web User Interface": str prefix : "Path Prefix" = None log - "Log": - bool file_log : "File Log" = True - folder log_folder : "Folder" = Logs - int log_count : "Count" = 5 - int log_size : "Size in kb" = 100 - bool log_rotate : "Log Rotate" = True - bool color_console : "Colored console" = True - label;line;mixed color_template : "Color template" = mixed + bool file_log : "File Log" = True + folder log_folder : "Folder" = Logs + int log_count : "Count" = 5 + int log_size : "Size in KB" = 100 + bool log_rotate : "Log Rotate" = True + bool color_console : "Colored console" = True + label;line console_mode : "Colored console mode" = line general - "General": en;de;fr;it;es;nl;sv;ru;pl;cs;sr;pt_BR language : "Language" = en folder download_folder : "Download Folder" = Downloads bool debug_mode : "Debug Mode" = False - int min_free_space : "Min Free Space (MB)" = 200 + int min_free_space : "Min Free Space in MB" = 200 bool folder_per_package : "Create folder for each package" = True int renice : "CPU Priority" = 0 auto;common;pyv8;node;rhino;jsc jsengine : "JS Engine" = auto @@ -41,7 +41,7 @@ general - "General": download - "Download": int chunks : "Max connections for one download" = 3 int max_downloads : "Max Parallel Downloads" = 3 - int max_speed : "Max Download Speed in kb/s" = -1 + int max_speed : "Max Download Speed in KB/s" = -1 bool limit_speed : "Limit Download Speed" = False str interface : "Download interface to bind (ip or Name)" = None bool ipv6 : "Allow IPv6" = False |