# HG changeset patch # User Matthew Wild # Date 1254668711 -3600 # Node ID d19c0a21bfb6f0cc26aa5bd665209fa792858b14 # Parent 1fde15a415e641cba1f044080f80fbc2e0d99ea5 net.server: Small logging improvements diff -r 1fde15a415e6 -r d19c0a21bfb6 net/server.lua --- a/net/server.lua Sun Oct 04 16:04:33 2009 +0100 +++ b/net/server.lua Sun Oct 04 16:05:11 2009 +0100 @@ -481,10 +481,10 @@ readtraffic = readtraffic + count _readtraffic = _readtraffic + count _readtimes[ handler ] = _currenttime - --out_put( "server.lua: read data '", buffer, "', error: ", err ) + --out_put( "server.lua: read data '", buffer:gsub("[^%w%p ]", "."), "', error: ", err ) return dispatch( handler, buffer, err ) else -- connections was closed or fatal error - out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) ) + out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " read error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) _ = handler and handler.close( ) @@ -521,7 +521,7 @@ _writetimes[ handler ] = _currenttime return true else -- connection was closed during sending or fatal error - out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) ) + out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " write error: ", tostring(err) ) fatalerror = true disconnect( handler, err ) _ = handler and handler.close( )