Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

azdle/log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logface

This library is intended to be used as a lightweight logging facade. This is a very early version that is only able to print log lines prefixed with the level in brackets. In the future I hope to make this a pluggable system that allows libraries to log using this library's interface, but allow end applications to choose the logging backend that actually receives the log statements.

Installing

logface can be installed using luarocks.

luarocks install logface

You may also simply download the file log.lua and place it in your working directory.

Use

local log = require "log"

log.info("Hello, world!")

Which will show:

[INFO] Hello, world!

The available levels are:

  • trace
  • debug
  • info
  • warn
  • error
  • fatal
  • print

The default level is INFO (and higher).

The level can be set by setting the LUALOG environment to one of the above levels (case insensitive) before logface is required. (Adjusting the log level later is not yet supported.)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages