Software /
code /
prosody
Diff
net/httpclient_listener.lua @ 1227:6a587ca99109
httpclient_listener: Don't use print()...
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 29 May 2009 22:04:57 +0100 |
parent | 737:ade262a8da7f |
child | 1522:569d58d21612 |
line wrap: on
line diff
--- a/net/httpclient_listener.lua Fri May 29 23:23:56 2009 +0500 +++ b/net/httpclient_listener.lua Fri May 29 22:04:57 2009 +0100 @@ -1,7 +1,7 @@ +local log = require "util.logger".init("httpclient_listener"); local connlisteners_register = require "net.connlisteners".register; - local requests = {}; -- Open requests local buffers = {}; -- Buffers of partial lines @@ -11,7 +11,7 @@ local request = requests[conn]; if not request then - print("NO REQUEST!! for "..tostring(conn)); + log("warn", "Received response from connection %s with no request attached!", tostring(conn)); return; end @@ -29,7 +29,7 @@ end function httpclient.register_request(conn, req) - print("Registering a request for "..tostring(conn)); + log("debug", "Attaching request %s to connection %s", tostring(req.id or req), tostring(conn)); requests[conn] = req; end