{"id":13524624,"url":"https://github.com/dknight/loveprofiler","last_synced_at":"2025-12-25T16:59:44.059Z","repository":{"id":66779354,"uuid":"439714648","full_name":"dknight/loveprofiler","owner":"dknight","description":null,"archived":false,"fork":false,"pushed_at":"2024-08-15T17:39:32.000Z","size":1003,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-02T09:31:43.671Z","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/dknight.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-18T21:04:47.000Z","updated_at":"2024-08-15T17:39:35.000Z","dependencies_parsed_at":"2024-08-15T19:34:36.043Z","dependency_job_id":"c361bc2e-0099-4d4b-a044-ec3d45ee57d7","html_url":"https://github.com/dknight/loveprofiler","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dknight%2Floveprofiler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dknight%2Floveprofiler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dknight%2Floveprofiler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dknight%2Floveprofiler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dknight","download_url":"https://codeload.github.com/dknight/loveprofiler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246578451,"owners_count":20799828,"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-08-01T06:01:11.849Z","updated_at":"2025-12-25T16:59:44.001Z","avatar_url":"https://github.com/dknight.png","language":"Lua","funding_links":[],"categories":["Development"],"sub_categories":[],"readme":"# LoveProfile for Löve2D\n\nLoveProfiler is an extremely simple logger and profiler for [Löve2D](https://love2d.org/)\nframework. It displays useful information about the current state of a running game.\nIt also can log events at three levels: information, warnings\nand errors. The output of the profiler is displayed on the Löve2D canvas or\nin the console (terminal).\n\n![LoveProfiler Demo](/screenshots/loveprofiled-demo.gif?raw=true)\n\n## Installation\n\nInstallation is very easy. Just use git clone or copy directory `loveprofiler`\ninto your game's directory where file `main.lua` is.\n\n```sh\ngit clone https://github.com/dknight/loveprofiler\n```\n\nExample project structure:\n\n```\nlove2dproject/\n  loveprofiler/\n  main.lua\n```\n\n## Usage\n\nThe most basic usage, create an instance of `love.load()` then call start() method inside `love.draw()`.\n\n```lua\nlocal LoveProfiler = require(\"loveprofiler\")\n\nfunction love.load()\n  profiler = LoveProfiler:new()\nend\n\nfunction love.draw()\n  profiler:start()\nend\n\n```\n\n## Configuration\n\nYou can find all possible configuration options with detailed description in `defaults.lua` file. You can override any option when you create a new instance.\n\n```lua\nlocal LoveProfiler = require(\"loveprofiler\")\n\nfunction love.load()\n  profiler = LoveProfiler:new{config = {\n    driver = \"console\",\n    font_size = 17,\n    draw_x = 400,\n    color = {0, 0, 1, 1}\n  }}\nend\n\nfunction love.draw()\n  profiler:start()\nend\n```\n\n## Drivers\n\nAt the moment only 2 drivers are supported: canvas and console. If a driver is set to **canvas** then information is displayed directly on the Löve2D canvas. If **console** then output will be displayed in the console (system terminal). See `defaults.lua` file for more details.\n\n## Logging\n\nThere are 3 levels of messages:\n\n- information;\n- warning;\n- error.\n\nYou can add a log entry like this:\n\n```lua\nlocal LoveProfiler = require(\"loveprofiler\")\n\nfunction love.load()\n  profiler = LoveProfiler:new()\n  profiler:addMessage(\"Your information message\", LoveProfiler.LOG_INFO)\n  profiler:addMessage(\"Your warning message\", LoveProfiler.LOG_WARN)\n  profiler:addMessage(\"Your error message\", LoveProfiler.LOG_ERROR)\nend\n```\n\nBy default, logs are also saved in a file `loveprofiler.log`. You can change the logging destination by changing the configuration property `log_path = \"your_path_to_log_file\"`, see `defaults.lua`. Also if you set `log_path = nil`, output won't be saved into file at all.\n\n### Disabling logging\n\nTo completely disable logging set configuration property `log_enabled = false`.\n\n## Using multiple profilers\n\nYou can create as many LoveProfiler instances as you want with different configurations.\n\n```lua\nlocal LoveProfiler = require(\"loveprofiler\")\n\nfunction love.load()\n  profiler1 = LoveProfiler:new()\n  profiler2 = LoveProfiler:new{config = {\n  \tdriver = \"console\",\n    font_size = 18,\n    draw_x = 400,\n  }}\nend\n\nfunction love.draw()\n  profiler1:start()\n  profiler2:start()\nend\n```\n\n## Contribution\n\nFound a bug or implemented a new feature? Do not hesitate to make a pull request.\n\n## License\n\nThis software is distributed under [MIT license](https://opensource.org/licenses/MIT), so you are free to use it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdknight%2Floveprofiler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdknight%2Floveprofiler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdknight%2Floveprofiler/lists"}