This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
forked from Neopallium/lualogging
log4l provides a simple API to use logging features in Lua. Its design was based on log4j.
License
mwchase/log4l
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
log4l
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
This branch is 73 commits ahead, 1 commit behind Neopallium:master.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
log4l ========== https://mwchase.github.io/log4l/ UNMAINTAINED: see https://github.com/doronbehar/lua-logger or other forks of lualogging. Or fork them, or fork this, it's all good. log4l provides a simple API to use logging features in Lua. Its design was based on log4j. log4l currently supports, through the use of appenders, console, file, rolling file, email, socket and sql outputs. Current version is 1.3.0. It was developed for Lua 5.1 & 5.2. log4l is free software and uses the same license as Lua. It is part of the Kepler Project. Please see docs at http://neopallium.github.com/lualogging/ for more details Installation ============ Release 0.1 ------------- With LuaRocks: $ sudo luarocks install log4l Latest Git revision ------------------- With LuaRocks: $ sudo luarocks install https://github.com/mwchase/log4l/raw/log4l/log4l-scm-0.rockspec With make: $ sudo make Guide lines for improved logging performance ============================================ The changes that I have made allow more complex log message formatting to be done only when that log level is enabled. This will decrease the impact of logging statement when their level is disabled. * Use string.format() style formatting: logger:info("Some message prefix: val1='%s', val2=%d", "some string value", 1234) * For more complex log message formatting: local function log_callback(val1, val2) -- Do some complex pre-processing of parameters, maybe dump a table to a string. return string.format("Some message prefix: val1='%s', val2=%d", val1, val2) end -- function 'log_callback' will only be called if the current log level is "DEBUG" logger:debug(log_callback, "some string value", 1234)
About
log4l provides a simple API to use logging features in Lua. Its design was based on log4j.
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Lua 98.0%
- Makefile 1.4%
- Shell 0.6%