Skip to content

Named and customized logger instance, unit tests, performance improvement and fixes#14

Open
jxai wants to merge 6 commits intorxi:masterfrom
jxai:master
Open

Named and customized logger instance, unit tests, performance improvement and fixes#14
jxai wants to merge 6 commits intorxi:masterfrom
jxai:master

Conversation

@jxai
Copy link

@jxai jxai commented Mar 18, 2026

  • Supports creating an independent instances with its own config, and optionally a name (if specified the name appears in log output):
local logger = log{name="mymod", level="warn", usecolor=false}
logger.info("my info log")

Original global logger still works exactly as it used to be

  • Added a suite of unit tests, just run lua test.lua
  • Disabled log levels are automatically assigned a noop function instead of checking the level on every call - more efficient and it is transparent to the user
  • Other minor fixes

@jxai jxai changed the title Named and customized logger instance, unit tests, performance improvements and fixes Named and customized logger instance, unit tests, performance improvement Mar 18, 2026
@jxai jxai changed the title Named and customized logger instance, unit tests, performance improvement Named and customized logger instance, unit tests, performance improvement and fixes Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant