{"id":48139824,"url":"https://github.com/coderkearns/quicklog","last_synced_at":"2026-04-04T16:50:42.042Z","repository":{"id":62563363,"uuid":"457459301","full_name":"coderkearns/quicklog","owner":"coderkearns","description":"A quick-and-dirty python logger that's extensible by design.","archived":false,"fork":false,"pushed_at":"2022-09-24T20:57:24.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-05T22:20:20.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/coderkearns.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-02-09T17:24:54.000Z","updated_at":"2022-02-09T17:25:03.000Z","dependencies_parsed_at":"2022-11-03T15:45:25.823Z","dependency_job_id":null,"html_url":"https://github.com/coderkearns/quicklog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/coderkearns/quicklog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderkearns%2Fquicklog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderkearns%2Fquicklog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderkearns%2Fquicklog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderkearns%2Fquicklog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderkearns","download_url":"https://codeload.github.com/coderkearns/quicklog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderkearns%2Fquicklog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31406350,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-04-04T16:50:41.859Z","updated_at":"2026-04-04T16:50:41.990Z","avatar_url":"https://github.com/coderkearns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Quicklog\n\nA quick-and-dirty logger for python that's extensible by design.\n\n## Installation\n\n### Pip (recommended)\n\n```bash\n$ pip install coderkearns_quicklog\n```\n\n### Git\n\n```bash\n$ python -m pip install git+https://github.com/coderkearns/quicklog.git\n```\n\n## API Reference\n\n### BaseLogger\n\nIn [`base.py`](base.py). Extensible but unusable on its own. All other loggers should extend this class and implement a `log(level, *args)` method.\n\n#### `BaseLogger.LEVELS`\n\nA dict of all the log levels.\n\n| Number | Name |\n| :----- | :--- |\n| `0` | `\"DEBUG\" ` |\n| `1` | `\"INFO\"` |\n| `2` | `\"WARNING\"` |\n| `3` | `\"ERROR\"` |\n| `4` | `\"CRITICAL\"` |\n| `5` | `\"FATAL\"` |\n\n\n#### `BaseLogger.get_level(level_name)`\n\nGets a level number from the given name.\n\n```python\nBaseLogger.get_level(\"ERROR\") # =\u003e 3\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `level_name`   | `str` | **Required**. The name of the level. |\n\n#### `BaseLogger.get_level_name(self, level)`\n\nGets a level name given its number.\n\n```python\nBaseLogger.get_level_name(3) # =\u003e \"ERROR\"\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `level`   | `int` | **Required**. The number of the level. |\n\n#### `__init__(level=1)`\n\n```python\nlogger = BaseLogger(level)\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `level`   | `int⎮string` | **Optional**, default `1`. The level to show. Can be the level's number or the level's name. |\n\n#### `set_level(level)`\n\nChanges the minimum level to log to `level`\n\n```python\nlogger = BaseLogger(1) # INFO\nlogger.set_level(0) # DEBUG\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `level`   | `int` | **Required**. The level to show. |\n\n#### `debug(*args)`\n\nLogs a *DEBUG* level message.\n\n```python\nlogger.debug(\"some debug\") # [DEBUG] some debug\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n#### `info(*args)`\n\nLogs a *INFO* level message.\n\n```python\nlogger.info(\"some info\") # [INFO] some info\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n#### `warning(*args)`\n\nLogs a *WARNING* level message.\n\n```python\nlogger.warning(\"some warning\") # [WARNING] some warning\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n#### `error(*args)`\n\nLogs a *ERROR* level message.\n\n```python\nlogger.error(\"some error\") # [ERROR] some error\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n#### `critical(*args)`\n\nLogs a *CRITICAL* level message.\n\n```python\nlogger.critical(\"some critical\") # [CRITICAL] some critical\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n#### `fatal(*args)`\n\nLogs a *FATAL* level message.\n\n```python\nlogger.fatal(\"some fatal\") # [FATAL] some fatal\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `*args`   | `any` | The values to log. |\n\n### FileLogger\n\nIn [`file.py`](file.py). Stores it's logs in a file.\n\n#### `__init__(path, level=1)`\n\nCreates a new FileLogger for the given path.\n\n```python\nfile_logger = FileLogger(\"./filelogs.log\", \"ERROR\")\n```\n\n| Parameter | Type     | Description                |\n| :-------- | :------- | :------------------------- |\n| `path`   | `str` | The path to the log file. It it does not exist, create it. |\n\n#### `log(level, *args)`\n\nAppends a log the the log file.\n\nFormatted as `[\u003clevel_name\u003e] \u003cargs\u003e`\n\n#### `open()`\n\nOpens the file at the given path.\n\n#### `close()`\n\nCloses the file at the given path.\n\n### MemoryLogger\n\nIn [`memory.py`](memory.py). Stores it's logs in a list.\n\n#### `log(level, *args)`\n\nAdds a log to the internal list.\n\nFormatted as `[\"\u003clevel_name\u003e\", \u003cargs\u003e]`\n\n#### `get_logs()`\n\nReturns a list with all the logs in the format `[level_name, *args]`\n\n```python\nmemory_logger.debug(\"a\")\nmemory_logger.error(\"b\", 1)\n\nmemory_logger.get_logs()\n# =\u003e [[\"DEBUG\", \"a\"], [\"ERROR\", \"b\", 1]]\n```\n\n### StdoutLogger\n\nIn [`stdout.py`](stdout.py). Logs to the stdout using `print()`.\n\n#### `log(level, *args)`\n\nPrints a log to the stdout.\n\nFormatted as `[\u003clevel_name\u003e] \u003cargs\u003e`\n\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderkearns%2Fquicklog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderkearns%2Fquicklog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderkearns%2Fquicklog/lists"}