Software /
code /
prosody
Changeset
1227:6a587ca99109
httpclient_listener: Don't use print()...
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 29 May 2009 22:04:57 +0100 |
parents | 1226:3b5f9dac2045 |
children | 1229:331a68645f67 |
files | net/httpclient_listener.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
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