Changeset

70:5e93cfc73444

clix: Fix logging for new Verse
author Matthew Wild <mwild1@gmail.com>
date Sun, 12 Feb 2012 20:45:06 +0000 (2012-02-12)
parents 69:4b65a9a0229b
children 71:075ecfa46484
files clix.lua
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/clix.lua	Sun Feb 12 02:22:58 2012 +0100
+++ b/clix.lua	Sun Feb 12 20:45:06 2012 +0000
@@ -58,12 +58,11 @@
 		io.stderr:write("The specified account (", opts.account or "default", ") wasn't found in the config file\n");
 		return nil;
 	end
-	verse.set_logger(opts.verbose and verse.logger() or verse.filter_log({"error"}, verse.logger()));
-	local conn = verse.new(verse.logger());
+	verse.set_log_handler(io.stderr, not opts.verbose and {"error"});
+	local conn = verse.new();
 	for _, plugin in ipairs(plugins or {}) do
 		conn:add_plugin(plugin);
 	end
-	conn.log.debug = opts.verbose;
 	conn:hook("authentication-failure", function (err)
 		conn:error("Authentication failure ("..(err.condition or "unknown error")..")"..(err.text and (": "..err.text) or ""));
 		conn:close();