{"id":22188907,"url":"https://github.com/qwreey/logger.lua","last_synced_at":"2025-03-24T20:16:34.647Z","repository":{"id":44798910,"uuid":"447976142","full_name":"qwreey/logger.lua","owner":"qwreey","description":"a logging library for lua, luajit, luvit with support luvit's fs, readline, pretty-print too","archived":false,"fork":false,"pushed_at":"2022-09-03T22:52:37.000Z","size":317,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T00:32:07.825Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qwreey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-01-14T13:26:02.000Z","updated_at":"2023-09-22T13:01:29.000Z","dependencies_parsed_at":"2023-01-17T19:10:29.959Z","dependency_job_id":null,"html_url":"https://github.com/qwreey/logger.lua","commit_stats":null,"previous_names":["qwreey/logger.lua"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwreey%2Flogger.lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwreey%2Flogger.lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwreey%2Flogger.lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qwreey%2Flogger.lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qwreey","download_url":"https://codeload.github.com/qwreey/logger.lua/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245344005,"owners_count":20599867,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-02T11:13:10.551Z","updated_at":"2025-03-24T20:16:34.620Z","avatar_url":"https://github.com/qwreey.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hello World!\n\nThis library is mono module library, so if you want to use this library, just copy logger.lua into fit of directory in your workspace  \nThis module is too simple! so it doesn need to described much!\n\n# Install with lit package manager\n\n```\nlit install qwreey75/logger\n```\n\n# Features\n\n## Many Lua Platforms\n\nOn every lua platform works! this library will detect what you use and select propr base librarys Like below image, it works with lua5.3, luajit, luvit and more!  \n![preview](./img/preview.png)\n\n## Multiple Lines\n\nIt will automatically detect new lines and adding spaces\n\n![preview](./img/multipleLine.png)\n\n```lua\n_G.require = require -- must be need!\nlocal logger = require \"logger\"\n\nlogger.info(\"Hello world!\\nThis library supports multiple lines too!\\nYou can write log pretty and easily with this!\")\n```\n\n## Many Levels\n\nIt supports many levels as default! you can add more levels with editting logger.lua\n\n![preview](./img/levels.png)\n\n```lua\n_G.require = require -- must be need!\nlocal logger = require \"logger\"\n\nlogger.info(\"Info level\")\nlogger.debug(\"Debug level\")\nlogger.error(\"Error level\")\nlogger.trace(\"Trace level\")\nlogger.fatal(\"Fatal level\")\nlogger.warn(\"Warn level\")\n```\n\n## Tab Character\n\nTab character will display as ' →  │'  \n![tab](img/tab.png)  \n\n## Escape Special Characters\n\nIt displays special characters as highlighted text\n\n![preview](./img/escape.png)\n\n```lua\n_G.require = require -- must be need!\nlocal logger = require \"logger\"\n\nlogger.info(\"\\127\") -- del key, this is will escaped\nlogger.info(\"\\27[4mUNDERLINE\") -- this is will not escaped\n```\n\n## Line Number / File Name\n\nThis library supports line number and file name by debug library, you can catch where log message was written!\n\n![preview](./img/line.png)\n\n## Formatting\n\nYou don't need to use `logger.info(string.format(...))`, you can do samething with `logger.infof`  \nAll of levels support this\n\n![preview](./img/format.png)\n\n```lua\n_G.require = require -- must be need!\nlocal logger = require \"logger\"\n\nlocal user = {}\nuser.name = \"Qwreey\"\n\nlogger.infof(\"User Name Is : %s\",user.name)\n```\n\n## Display Table / Other Types\n\n**WORKS ON ONLY LUVIT**  \nThis library supports luvit's pretty-print library, so if you pass table info log function, it will automatically dump table into string and show that!\n\n![preview](./img/table.png)\n\n```lua\n_G.require = require -- must be need!\nlocal logger = require \"logger\"\n\nlogger.info({qus=\"It is supports table?\",ans=\"Yes!\"})\n```\n\n## Appender\n\nTODO: description for appender\n\n## Other Settings\n\nTODO: description for settings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwreey%2Flogger.lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqwreey%2Flogger.lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqwreey%2Flogger.lua/lists"}