diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-01-16 05:36:39 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-01-16 05:36:39 +0000 |
commit | cdc8bc011779ebc22db4d215a10caa335873d5e2 (patch) | |
tree | 6e97f48997648107c1c121e5d1abb39d26777c9b /net/server.lua | |
parent | dbbaf43f8c74125a35f73d5ae7c7ebbe6217c362 (diff) | |
download | prosody-cdc8bc011779ebc22db4d215a10caa335873d5e2.tar.gz prosody-cdc8bc011779ebc22db4d215a10caa335873d5e2.zip |
Fixed server.lua to use prosody logger for errors
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 6 |
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 |