{"id":16211070,"url":"https://github.com/duckboss/logtale","last_synced_at":"2025-07-25T03:02:15.535Z","repository":{"id":211638369,"uuid":"729631926","full_name":"DuckBoss/logtale","owner":"DuckBoss","description":"A simple, easy to use python logging framework that builds on top of the built-in logger module.","archived":false,"fork":false,"pushed_at":"2024-01-03T14:41:00.000Z","size":242,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T13:47:07.409Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DuckBoss.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}},"created_at":"2023-12-09T20:56:13.000Z","updated_at":"2023-12-17T22:04:36.000Z","dependencies_parsed_at":"2023-12-09T22:20:48.018Z","dependency_job_id":"f6a9c9db-7e62-40f7-8c40-e0ab43fb229a","html_url":"https://github.com/DuckBoss/logtale","commit_stats":null,"previous_names":["duckboss/tale"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckBoss%2Flogtale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckBoss%2Flogtale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckBoss%2Flogtale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckBoss%2Flogtale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DuckBoss","download_url":"https://codeload.github.com/DuckBoss/logtale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238747874,"owners_count":19523849,"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-10-10T10:45:29.725Z","updated_at":"2025-02-13T22:52:22.385Z","avatar_url":"https://github.com/DuckBoss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"###  LogTale - A python logging framework\nA simple, easy to use logging framework that builds on top of the built-in logger module.\n\n[![PyPI - Version](https://img.shields.io/pypi/v/logtale?color=green)](https://pypi.org/project/logtale)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/DuckBoss/logtale?link=https%3A%2F%2Fgithub.com%2FDuckBoss%2Flogtale%2Freleases)](https://github.com/DuckBoss/logtale/releases)\n\n\n### Installation\n``` bash\npip install logtale\n```\n\n### Usage\nSimple Usage:\n``` python\nimport logtale.logtale as tale\n\n\ndef main():\n    logtale = tale.LogTale(\"example\", \"./example.toml\")\n    logger = logtale.logger(__name__)\n\n    logger.debug(\"test - debug\")\n    logger.info(\"test - info\")\n    logger.warning(\"test - warning\")\n    logger.error(\"test - error\")\n    logger.critical(\"test - critical\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nPrepend/Postpend text to the log message:\n``` python\nlogger.addFilter(filter.LogAppendFilter(prepend_text=\"ExamplePrepend\"))\nlogger.addFilter(filter.LogAppendFilter(postpend_text=\"ExamplePostpend\"))\n```\n\n### Configuration File\nCreate a configuration file for logging settings using the `templates/config_template.toml` file as a template.\n\n``` toml\n[output.colors]\n# Set the colors associated with each debug level.\n# Colors are only applied for logs printed to the console.\n# The logging color feature can be enabled/disabled in '[output.console]' section.\nDEBUG = '\\033[1;36m'\nINFO = '\\033[1;38m'\nWARNING = '\\033[1;33m'\nERROR = '\\033[1;35m'\nCRITICAL = '\\033[1;31m'\n\n[output.file]\nenable = true # enable/disable logging to a .log file (default=true)\nlevel = \"DEBUG\" # the base log level for logging to a file (default=DEBUG)\npath = \"logs/\" # the directory to create log files in (default=logs/)\nformat = \"(%(asctime)s)[%(name)s][%(levelname)s]::%(message)s\" # the log message format to use for file logging\nname = \"example.log\" # the naming scheme of the log file, by default it's '\u003cproject_name\u003e_\u003cversion\u003e_\u003ctimestamp\u003e.log'\n\n[output.console]\nenable = true # enable/disable logging to the console (default=true)\nlevel = \"DEBUG\" # the base log level for logging to the console (default=DEBUG)\nformat = \"[%(levelname)s]::%(message)s\" # the log message format to use for console logging\nuse_colors = true # enable/disable the use of colors for log levels. colors can be customized in '[output.colors]' section.\n```\n\n### Examples\nCheck the `examples` directory for example scripts and configuration files.\n\n``` python\n# ./examples/example.py\nimport logtale.logtale as tale\nimport logtale.filter as filter\n\n\ndef main():\n    logtale = tale.LogTale(\"example\", \"./example.toml\")\n    logger = logtale.logger(__name__)\n    logger.addFilter(filter.LogAppendFilter(prepend_text=\"ExamplePrepend\"))\n\n    logger.debug(\"test - debug\")\n    logger.info(\"test - info\")\n    logger.warning(\"test - warning\")\n    logger.error(\"test - error\")\n    logger.critical(\"test - critical\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n#### Example log console output\n![example console output image](./examples/example_console_output.png)\n\n#### Example log file output\n![example file output image](./examples/example_file_output.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckboss%2Flogtale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckboss%2Flogtale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckboss%2Flogtale/lists"}