Comparison

prosodyctl @ 8881:a0de4fc4acd5

prosodyctl: Make log level configurable through PROSODYCTL_LOG_LEVEL (useful for debugging)
author Matthew Wild <mwild1@gmail.com>
date Thu, 07 Jun 2018 11:21:51 +0100
parent 8560:489998717387
child 8882:a420b386a72a
child 8947:f12cc1d7aa65
comparison
equal deleted inserted replaced
8880:9e565d0b1771 8881:a0de4fc4acd5
109 print(""); 109 print("");
110 os.exit(1); 110 os.exit(1);
111 end 111 end
112 end 112 end
113 local original_logging_config = config.get("*", "log"); 113 local original_logging_config = config.get("*", "log");
114 config.set("*", "log", { { levels = { min="info" }, to = "console" } }); 114 config.set("*", "log", { { levels = { min = os.getenv("PROSODYCTL_LOG_LEVEL") or "info" }, to = "console" } });
115 115
116 local data_path = config.get("*", "data_path") or CFG_DATADIR or "data"; 116 local data_path = config.get("*", "data_path") or CFG_DATADIR or "data";
117 local custom_plugin_paths = config.get("*", "plugin_paths"); 117 local custom_plugin_paths = config.get("*", "plugin_paths");
118 if custom_plugin_paths then 118 if custom_plugin_paths then
119 local path_sep = package.config:sub(3,3); 119 local path_sep = package.config:sub(3,3);