{"id":13753555,"url":"https://github.com/octplane/ansible_stdout_compact_logger","last_synced_at":"2026-01-29T15:12:11.582Z","repository":{"id":63999343,"uuid":"77600319","full_name":"octplane/ansible_stdout_compact_logger","owner":"octplane","description":"Ansible Stdout Compact Logger","archived":false,"fork":false,"pushed_at":"2023-03-09T20:41:46.000Z","size":629,"stargazers_count":213,"open_issues_count":4,"forks_count":28,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-05-09T21:35:14.621Z","etag":null,"topics":["ansible","logging"],"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/octplane.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":"2016-12-29T09:22:59.000Z","updated_at":"2025-04-16T07:43:03.000Z","dependencies_parsed_at":"2024-08-03T09:17:16.133Z","dependency_job_id":null,"html_url":"https://github.com/octplane/ansible_stdout_compact_logger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/octplane/ansible_stdout_compact_logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octplane%2Fansible_stdout_compact_logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octplane%2Fansible_stdout_compact_logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octplane%2Fansible_stdout_compact_logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octplane%2Fansible_stdout_compact_logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octplane","download_url":"https://codeload.github.com/octplane/ansible_stdout_compact_logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octplane%2Fansible_stdout_compact_logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28880017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["ansible","logging"],"created_at":"2024-08-03T09:01:24.507Z","updated_at":"2026-01-29T15:12:11.560Z","avatar_url":"https://github.com/octplane.png","language":"Python","readme":"# Ansible Stdout Compact Logger\n\n## Installation\n\n- put somewhere on your disk\n- add `callback_plugins` settings in your `[defaults]` settings in your ansible configuration\n- change stdout_callback to `anstomlog`\n\ncf `ansible.cfg`.\n\n## Features\n- [x] one-line display\n- [x] pylint compatible (almost...)\n- [x] displays tasks content in a nice way\n- [x] including UTF-8 strings\n- [x] indents structs, displays empty arrays, strings\n- [x] puts fields on top when available `['stdout', 'rc', 'stderr', 'start', 'end', 'msg']`\n- [x] removes some fields when present `[, 'stdout_lines', '_ansible_verbose_always', '_ansible_verbose_override']` to avoid too much clutter\n- [x] reverts to standard logger when more than `vv` verbosity\n- [x] supports `no_log` attribute in Task\n- [x] supports `_ansible_verbose_always` and `_ansible_verbose_override`\n- [x] supports multiple items in task (#1)\n- [x] multi host support\n- [x] correct duration computation\n- [x] Display duration in minutes when tasks last for more than 1 minute\n- [x] diff display support\n- [x] displays `stdout` and `stderr` nicely even when they contain `\\n`\n- [x] displays handlers calls\n- [x] Python 2/3 compatible\n- [ ] better line colouring\n- [ ] more test around curious errors\n\n## Without anstomlog\n\n![Stdout Display without anstomlog](img/without_anstomlog.png)\n\n## With anstomlog\n\n![Stdout Display with multiline outputs](img/with_anstomlog.png)\n\n## Test the logger\n\n- clone this repository\n```\nansible-playbook test-1.yml\n```\n- to run the tests, call `python callbacks/anstomlog.py`\n\n## License\n\nMIT, see LICENSE file.\n\n## Tips and tricks\n\n- Issue with non-ascii or utf-8 chars? Have a look at #4\n\n## Contributors\n\n- Pierre BAILLET @octplane\n- Frédéric COMBES @marthym\n- @tterranigma\n- @OurFriendIrony\n- Farzad FARID @farzy\n- Jérôme BAROTIN @jbarotin\n- Dale Henries @dalehenries\n- Thomas Decaux @ebuildy\n\n","funding_links":[],"categories":["logging"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctplane%2Fansible_stdout_compact_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctplane%2Fansible_stdout_compact_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctplane%2Fansible_stdout_compact_logger/lists"}