{"id":20338346,"url":"https://github.com/iammoltony/libmtnlog","last_synced_at":"2025-03-04T14:28:25.586Z","repository":{"id":203466749,"uuid":"709671876","full_name":"IAmMoltony/libmtnlog","owner":"IAmMoltony","description":"Moltony's logging library","archived":false,"fork":false,"pushed_at":"2024-04-13T13:25:06.000Z","size":151,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-14T04:05:18.087Z","etag":null,"topics":["c","c-library","cross-platform","library","logging"],"latest_commit_sha":null,"homepage":"https://iammoltony.github.io/mtnlog/index.html","language":"C","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/IAmMoltony.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":"2023-10-25T06:59:55.000Z","updated_at":"2024-01-16T09:00:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d3fa000-34e0-46e6-ace4-d13417f79faf","html_url":"https://github.com/IAmMoltony/libmtnlog","commit_stats":null,"previous_names":["iammoltony/libmtnlog"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmMoltony%2Flibmtnlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmMoltony%2Flibmtnlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmMoltony%2Flibmtnlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmMoltony%2Flibmtnlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IAmMoltony","download_url":"https://codeload.github.com/IAmMoltony/libmtnlog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241863512,"owners_count":20032998,"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":["c","c-library","cross-platform","library","logging"],"created_at":"2024-11-14T21:12:36.776Z","updated_at":"2025-03-04T14:28:25.560Z","avatar_url":"https://github.com/IAmMoltony.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MtnLog\n\n[![CodeFactor](https://www.codefactor.io/repository/github/iammoltony/libmtnlog/badge)](https://www.codefactor.io/repository/github/iammoltony/libmtnlog)\n\nMtnLog is a really simple logging library. Originally created for [ds-craft](https://github.com/IAmMoltony/ds-craft).\n\n## Notice\n\nThis library is not developed anymore. You can still contribute and I'll respond,\nbut don't expect any major new features.\n\nSee `rewrite.md`.\n\n## Using the library\n\nPaste the header and source code of the library into your project somewhere. I\nrecommend creating a separate folder for it and configuring your build system to\nadd MtnLog's include files and compile its source files.\n\n## Features\n\n- Logging messages into stdout\n- Three log levels: info, warning and error\n- Logging with timestamps\n- Logging with context (function, file and line)\n- Change what log level will be printed to the user\n- Logging into a file\n- Colored log messages\n- Log callback - run any code after logging a message\n\n## Testing\n\nInstead of using fancy testing toolkits, there is instead a script that\nutilises every feature of the library and it is checked whether the output\nlooks about right.\n\n### Running tests\n\n#### Using MSVC\n\nMSVC testing can be done using `dotest-msvc.bat` like this:\n\n`dotest-msvc`\n\n#### Non-MSVC\n\nNon-MSVC tests can be run using the `dotest.sh` script:\n\n`./dotest.sh`\n\nBy default the script tests using GCC, but it also supports other compilers. To\nsee the whole list, you can bring up help: `./dotest.sh help`\n\nPlease note that you need `bash` installed on your machine for the script\nto work.\n\n### Checking for memory leaks\n\nChecking for memory leaks can be done using `check-memleaks.sh`. The script\nrequires `valgrind` to be installed on the system.\n\n## Docs\n\nMtnLog uses [Doxygen](https://doxygen.nl) for generating documentation.\nAll you have to do is install it and run `doxygen` in the repo folder.\n\n## Platform compatibility\n\nThe library was tested on the following platforms:\n\n- Linux\n- Windows\n- Nintendo DS (homebrew using devkitPro)\n- Haiku\n- BSD (tested on NetBSD)\n- Nintendo GBA (homebrew using devkitPro)\n\nHowever, it should work with other POSIX-compatible OSes and environments,\nsuch as macOS.\n\nOn Windows, the library uses the Windows API for colored output. On other\nplatforms it uses ANSI escape sequences.\n\nBefore turning color on, make sure that the terminal supports color. You can\nuse the `mtnlogCheckColor()` function for that.\n\n## Compiler compatibility\n\nThe library is known to work on the following compilers:\n\n- GCC\n- Clang\n- TCC (TinyCC)\n- MinGW\n- Intel oneAPI C compiler\n- Visual Studio 2010+\n\n## Troubleshooting\n\n### `stdbool.h` not found\n\nMtnLog can work without `stdbool.h`. Define the `MTNLOG_NO_STDBOOL` macro\nin your compiler/build system options.\n\nThis problem usually happens on really old compilers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammoltony%2Flibmtnlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiammoltony%2Flibmtnlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammoltony%2Flibmtnlog/lists"}