aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-01-16 05:36:39 +0000
committerMatthew Wild <mwild1@gmail.com>2009-01-16 05:36:39 +0000
commitcdc8bc011779ebc22db4d215a10caa335873d5e2 (patch)
tree6e97f48997648107c1c121e5d1abb39d26777c9b /net
parentdbbaf43f8c74125a35f73d5ae7c7ebbe6217c362 (diff)
downloadprosody-cdc8bc011779ebc22db4d215a10caa335873d5e2.tar.gz
prosody-cdc8bc011779ebc22db4d215a10caa335873d5e2.zip
Fixed server.lua to use prosody logger for errors
Diffstat (limited to 'net')
-rw-r--r--net/server.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/server.lua b/net/server.lua
index ccc0aa49..7416276f 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -36,8 +36,10 @@ local string_sub = use'string'.sub
local coroutine_wrap = coroutine.wrap
local coroutine_yield = coroutine.yield
local print = print;
+
+local log = require "util.logger".init("server");
local out_put = function () end --print;
-local out_error = print;
+local out_error = function (...) log("error", table_concat({...}, " ")); end
--// extern libs //--
@@ -797,7 +799,7 @@ addserver = function( listeners, port, addr, mode, sslctx, wrapper_function )
addr = addr or "*"
local server, err = socket_bind( addr, port )
if err then
- out_error( "server.lua: ", err )
+ out_error( addr..":"..port.." -", err )
return nil, err
end
local handler, err = wrapserver( listeners, server, addr, port, mode, sslctx, wrapper_function ) -- wrap new server socket