loggingmanager: Support for specifying a single sink with *sinkname (*syslog should now work)

Sun, 03 May 2009 17:13:43 +0100

author
Matthew Wild <mwild1@gmail.com>
date
Sun, 03 May 2009 17:13:43 +0100
changeset 1101
fb096ca4b296
parent 1099
127e6ae089f8
child 1102
c81df501fd38

loggingmanager: Support for specifying a single sink with *sinkname (*syslog should now work)

core/loggingmanager.lua file | annotate | diff | comparison | revisions
--- a/core/loggingmanager.lua	Sun May 03 01:10:49 2009 +0100
+++ b/core/loggingmanager.lua	Sun May 03 17:13:43 2009 +0100
@@ -86,6 +86,9 @@
 			add_rule(sink_config);
 			sink_config.filename = nil;
 		end
+	elseif type(logging_config) == "string" and logging_config:match("^%*(.+)") == sink_type then
+		-- Log all levels (debug+) to this sink
+		add_rule({ levels = { min = "debug" }, to = sink_type });
 	end
 end
 

mercurial