Skip to content

nikneym/log.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

log.lua

Simple logger for simple duties. Sometimes you may want some colorful output on what you do.

Example Output

Setup

Download the log.lua file and include it in your project like local log = require "log" (true).

Usage

-- passing false there would've turned off the logging
local log = require "log" (true)
-- e.g
-- local log = require "log" (false)

-- same as log.trace
log "quick brown fox jumps over the lazy dog"

log.warn  "quick brown fox jumps over the lazy dog"
log.debug "quick brown fox jumps over the lazy dog"
log.trace "quick brown fox jumps over the lazy dog"
log.error "quick brown fox jumps over the lazy dog"
log.info  "quick brown fox jumps over the lazy dog"
log.fatal "quick brown fox jumps over the lazy dog"

-- string can be formatted by passing desired values to the log call
-- anything can be passed
log.info("Hello good people of the %s!", "internet")

License

See LICENSE for details.

About

Simple logger for simple duties

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages