Moving start messages to lua

Moved start log messages to lua, to make easier to enable/disable those
messages.
This commit is contained in:
Ricardo Ianelli
2013-02-10 02:28:47 -02:00
parent 7f918a12a2
commit cbeab6f9b0
4 changed files with 11 additions and 7 deletions

View File

@@ -3,13 +3,14 @@
-- setup logger
g_logger.setLogFile(g_resources.getWorkDir() .. g_app.getCompactName() .. ".log")
g_logger.info(os.date("== application started at %b %d %Y %X"))
-- print first terminal message
g_logger.info(g_app.getName() .. ' ' .. g_app.getVersion() .. ' rev ' .. g_app.getBuildRevision() .. ' (' .. g_app.getBuildCommit() .. ') built on ' .. g_app.getBuildDate() .. ' for arch ' .. g_app.getBuildArch())
-- add data directory to the search path
if not g_resources.addSearchPath(g_resources.getWorkDir() .. "data", true) then
g_logger.fatal("Unable to add data directory to the search path.")
g_logger.fatal("Unable to add data directory to the search path.")
end
-- add modules directory to the search path
@@ -50,5 +51,4 @@ g_modules.autoLoadModules(9999)
local script = '/' .. g_app.getCompactName() .. 'rc'
if g_resources.fileExists(script) then
dofile(script)
end
end