LUA LOG
来源:互联网 发布:梦想世界跨服传输数据 编辑:程序博客网 时间:2024/06/05 10:05
DEBUGLOG = 1if DEBUGLOG == 1 then__print = printlocal lfs = require("lfs")local logPath = cc.FileUtils:getInstance():getWritablePath()local targetPlatform = cc.Application:getInstance():getTargetPlatform()if targetPlatform <= 3 then logPath = logPath .. "zjh_log/"lfs.mkdir(logPath)local file = io.open(logPath .. string.gsub(os.date("%X"), "%p", "-") .. ".log", "w+")file:setvbuf("no")print = function ( ... )table.insert(arg, 1, os.date("%X") .. " ")for i,v in ipairs(arg) dofile:write( tostring(v) .. " " )endfile:write("\n")__print( unpack(arg) )endendend
阅读全文
0 0
- LUA LOG
- Lua Self-study Log
- cocos2dx-Lua 如何打印Lua代码Log
- cocos2dx lua开发调试打log方式
- 【OpenResty】lua脚本实现nginx自定义log
- 可编程的log—初识lua的强大
- lua中让log的模块开关更人性化
- cocos2dx lua让print 在andriod 输出log的方法
- 【ulua入门】log(打印)lua中的table数据
- lua 写的游戏log逻辑(基本支持lua所有格式)
- log
- log
- log
- Log
- LOG
- log
- log
- log
- LeetCode--3Sum Closest
- 为什么static修饰SimpleDateFormat会有问题
- 哪些域名才是真正意义上的好域名?
- 机器学习之线性分类器(Linear Classifiers)——肿瘤预测实例
- 架构师之路-网络框架的搭建(高逼格)
- LUA LOG
- SpringBoot+SpringSecurityOAuth2.0 实现SSO单点登录(一)--服务端
- Java 集合系列08之 List总结(LinkedList, ArrayList等使用场景和性能分析)
- TOJ 4168 I-The brute force problem(数论)
- 第二章:2.0 Django 入门和开发环境
- MySQL之完整性约束
- c++ debugger package is missing or incompatible
- Mybatis Generator在Intellij中的使用
- 从Git仓库中恢复已删除的分支或丢失的commit