Giter Club home page Giter Club logo

lualogger's Introduction

LuaLogger

一个超简单的LUA 日志工具(A very simple Lua Logger tool) 欢迎大家到 http://www.ostack.cn 交流编程经验

使用方法(How to use)

使用前需要require 本模块,通过返回的变量来调用提供的方法 Should require Log first, then use the return val's function ##使用示例

local Log = require("LuaLogger.Log")

##直接调用Log的方法,(use defual log print function)

Log:debug("this msg is teat use log");

Log:info("this msg is teat use log");

Log:warn("this msg is teat use log");

Log:error("this msg is teat use log");

##设置自己的log日志方法(set self log fuction)

local function log_callBack(level, msg) print(level .. msg) end

Log:setLogCallBack(log_callBack)

Log:info("this msg is teat use self define log call back");

##修改日志级别,默认打印info以上级别(Set log level,default is info)

Log:setLogLevel(Log._l_log_level_error);

相關倉庫

https://github.com/ostack/LuaUnit https://github.com/ostack/LuaLogger https://github.com/ostack/LuaMock

lualogger's People

Contributors

zhaoguangyue1986 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.