{"id":18556702,"url":"https://github.com/valkryst/c_logging","last_synced_at":"2025-05-15T13:33:34.597Z","repository":{"id":142749521,"uuid":"468041718","full_name":"Valkryst/C_Logging","owner":"Valkryst","description":"A convenience function which allows for easier error logging and debugging.","archived":false,"fork":false,"pushed_at":"2022-03-09T18:41:23.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-17T11:34:13.030Z","etag":null,"topics":["debugging","error-log","error-messages","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Valkryst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"github":"Valkryst"}},"created_at":"2022-03-09T18:11:49.000Z","updated_at":"2022-03-09T18:21:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd44d68c-b3d8-4a4f-90bb-90c7c5d1933a","html_url":"https://github.com/Valkryst/C_Logging","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FC_Logging","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FC_Logging/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FC_Logging/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valkryst%2FC_Logging/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valkryst","download_url":"https://codeload.github.com/Valkryst/C_Logging/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254349288,"owners_count":22056316,"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":["debugging","error-log","error-messages","logger","logging"],"created_at":"2024-11-06T21:32:57.756Z","updated_at":"2025-05-15T13:33:34.562Z","avatar_url":"https://github.com/Valkryst.png","language":"C","readme":"The foci of this repository are the [logger.c](https://github.com/Valkryst/C_Logging/blob/main/src/logger.c)\nand [logger.h](https://github.com/Valkryst/C_Logging/blob/main/src/logger.h)\nfiles. They define the `printError` function which allows you to print detailed\nand descriptive error messages to aid in development and debugging.\n\n## Compiling\n\nAdd `logger.c` and `logger.h` to your project, update your build script, and\ncompile as you normally would.\n\nSee the provided [Makefile](https://github.com/Valkryst/C_Mutex/blob/main/Makefile)\nas a reference.\n\n## Usage\n\nSee [C_Mutex](https://github.com/Valkryst/C_Mutex/blob/main/src/mutex.c) and\n[C_PThread](https://github.com/Valkryst/C_PThread) as references.\n\nParameters:\n\n1. If you know that an error has occured and that [errno](https://www.cplusplus.com/reference/cerrno/errno/) has been set, then set the first parameter to `errno`. Else set it to `0`.\n2. This should be set to [`__FILE__`](https://www.cprogramming.com/reference/preprocessor/__FILE__.html), but it also accepts `NULL`.\n3. This should be set to [`__PRETTY_FUNCTION__`](https://gcc.gnu.org/onlinedocs/gcc/Function-Names.html), but it also accepts `NULL`.\n4. This should contain a descriptive error message, specific to your program, and should contain information helpful in debugging the related error. This also accepts `NULL`.\n\nExample:\n\n```c\nprintError(errno, __FILE__, __PRETTY_FUNCTION__, \"Some error message.\");\n```\n","funding_links":["https://github.com/sponsors/Valkryst"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkryst%2Fc_logging","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalkryst%2Fc_logging","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalkryst%2Fc_logging/lists"}