Software /
code /
prosody
Comparison
net/server.lua @ 740:cc25d75b4027
server.lua: Use Prosody logger for errors, silence non-errors
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 17 Jan 2009 14:53:20 +0000 |
parent | 739:1def06cd9311 |
child | 741:97577b6c07ca |
comparison
equal
deleted
inserted
replaced
739:1def06cd9311 | 740:cc25d75b4027 |
---|---|
15 local clean = function( tbl ) | 15 local clean = function( tbl ) |
16 for i, k in pairs( tbl ) do | 16 for i, k in pairs( tbl ) do |
17 tbl[ i ] = nil | 17 tbl[ i ] = nil |
18 end | 18 end |
19 end | 19 end |
20 local out_put = print | 20 |
21 local out_error = print | 21 local log, table_concat = require ("util.logger").init("socket"), table.concat; |
22 local out_put = function () end | |
23 local out_error = function (...) return log("warn", table_concat{...}); end | |
22 local mem_free = collectgarbage | 24 local mem_free = collectgarbage |
23 | 25 |
24 ----------------------------------// DECLARATION //-- | 26 ----------------------------------// DECLARATION //-- |
25 | 27 |
26 --// constants //-- | 28 --// constants //-- |