_print = print
function print( ... )
-- 写日志文件
if DEBUG >= 1 then
local date = os.date("%Y-%m-%d %H:%M:%S")
local tableP = { ... }
local filename = "print_log.txt"
local file
if initFile1 == nil then
initFile1 = io.open(filename,"w+")
file = initFile1
else
file = io.open(filename,"a")
end
if false then
function print( ... )
-- 写日志文件
if DEBUG >= 1 then
local date = os.date("%Y-%m-%d %H:%M:%S")
local tableP = { ... }
local filename = "print_log.txt"
local file
if initFile1 == nil then
initFile1 = io.open(filename,"w+")
file = initFile1
else
file = io.open(filename,"a")
end
if false then
--file:write("["..AccountId..date.."
else
file:write("["..date.."]")
for i, v in pairs( tableP ) do
if type(v) == "boolean" then
if v then v = "true" else v = "false" end
file:write( v )
elseif type(v) == "userdata" then
elseif type(v) == "table" then
else
file:write( v )
end
end
end
file:write('\n')
end
file:close()
end
_print(...)
end