Add ReadMe.md

This commit is contained in:
2026-09-16 14:07:07 -06:00
parent c33816e367
commit aaa12b1e5c
+18
View File
@@ -0,0 +1,18 @@
# microlog
A small very flexible logging library for Lua.
## Usage
```lua
-- set arbitrary log levels to be printed immediately
log{ info = true, warning = true, ducksauce = true, }
-- send anything (except nil) to a log level
log("bacom", true, "text", 5, function() end, {})
-- print all messages saved at a particular log level
log("error")
-- toggle ALL logging on and off with a boolean
log(false) -- this deletes all stored messages
-- set a maximum number of stored messages per log level
log(50) -- warning: reaching large limits makes logging expensive
-- do anything to the stored messages (this example deletes them all)
log(function(messages) return {} end)
```