delphimvcframework/samples/eluaserversideviews/Win32/Debug/Lua/logging/console.lua
daniele.teti 3cc8eeeb7e
2014-04-01 15:58:31 +00:00

23 lines
642 B
Lua

-------------------------------------------------------------------------------
-- Prints logging information to console
--
-- @author Thiago Costa Ponte (thiago@ideais.com.br)
--
-- @copyright 2004-2011 Kepler Project
--
-------------------------------------------------------------------------------
require"logging"
function logging.console(logPattern)
return logging.new( function(self, level, message)
io.stdout:write(logging.prepareLogMsg(logPattern, os.date(), level, message))
return true
end
)
end
return logging.console