{"id":18637978,"url":"https://github.com/imponeer/log-data-output-decorator","last_synced_at":"2026-07-05T09:00:29.654Z","repository":{"id":38012068,"uuid":"337237313","full_name":"imponeer/log-data-output-decorator","owner":"imponeer","description":"Small decorator that extends @Symfony OutputInterface delivered class with few options for easier to log data","archived":false,"fork":false,"pushed_at":"2026-07-01T15:23:10.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-07-01T17:19:01.607Z","etag":null,"topics":["composer-library","decorator","hacktoberfest","symfony-console"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/imponeer.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-02-08T23:23:23.000Z","updated_at":"2026-07-01T15:23:13.000Z","dependencies_parsed_at":"2024-05-01T17:08:36.550Z","dependency_job_id":"28ba56b0-8cf2-43ae-91b1-40f0478cfc42","html_url":"https://github.com/imponeer/log-data-output-decorator","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":"0.33333333333333337","last_synced_commit":"c4745f24fc66c78475b991ae840f5d816034474d"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/imponeer/log-data-output-decorator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Flog-data-output-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Flog-data-output-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Flog-data-output-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Flog-data-output-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imponeer","download_url":"https://codeload.github.com/imponeer/log-data-output-decorator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imponeer%2Flog-data-output-decorator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35148606,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["composer-library","decorator","hacktoberfest","symfony-console"],"created_at":"2024-11-07T05:38:31.388Z","updated_at":"2026-07-05T09:00:29.567Z","avatar_url":"https://github.com/imponeer.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![License](https://img.shields.io/github/license/imponeer/log-data-output-decorator.svg)](LICENSE) [![GitHub release](https://img.shields.io/github/release/imponeer/log-data-output-decorator.svg)](https://github.com/imponeer/log-data-output-decorator/releases) [![PHP](https://img.shields.io/packagist/php-v/imponeer/log-data-output-decorator.svg)](http://php.net) [![Packagist](https://img.shields.io/packagist/dm/imponeer/log-data-output-decorator.svg)](https://packagist.org/packages/imponeer/log-data-output-decorator)\n\n# Log Data Output Decorator\n\nA decorator that extends [Symfony OutputInterface](https://github.com/symfony/console/blob/7.x/Output/OutputInterface.php) with:\n\n- Multiple message types: info, success, error, fatal, and plain messages\n- Automatic indentation with indent control methods\n- Parameter substitution using sprintf formatting\n- Full Symfony OutputInterface compatibility\n\n## Installation\n\nInstall via [Composer](https://getcomposer.org):\n\n```bash\ncomposer require imponeer/log-data-output-decorator\n```\n\n## Usage\n\n### Basic Usage\n\n```php\nuse Imponeer\\Decorators\\LogDataOutput\\OutputDecorator;\nuse Symfony\\Component\\Console\\Output\\ConsoleOutput;\n\n$output = new OutputDecorator(new ConsoleOutput());\n\n// Different message types\n$output-\u003einfo('This is an info message');\n$output-\u003esuccess('Operation completed successfully');\n$output-\u003eerror('An error occurred');\n$output-\u003efatal('Critical error - application stopping');\n$output-\u003emsg('Plain message without formatting');\n```\n\n### Indentation Support\n\n```php\n$output-\u003einfo('Main process started');\n$output-\u003eincrIndent();\n$output-\u003einfo('Sub-process 1');\n$output-\u003einfo('Sub-process 2');\n$output-\u003eincrIndent();\n$output-\u003einfo('Nested sub-process');\n$output-\u003edecrIndent();\n$output-\u003einfo('Back to sub-process level');\n$output-\u003eresetIndent();\n$output-\u003einfo('Back to main level');\n```\n\nOutput:\n```\nMain process started\n  Sub-process 1\n  Sub-process 2\n    Nested sub-process\n  Back to sub-process level\nBack to main level\n```\n\n### Parameter Substitution\n\n```php\n$output-\u003einfo('Processing file: %s', 'example.txt');\n$output-\u003esuccess('Processed %d files in %s seconds', 42, '1.23');\n$output-\u003eerror('Failed to process %s: %s', 'file.txt', 'Permission denied');\n```\n\n### Advanced Example\n\n```php\nuse Imponeer\\Decorators\\LogDataOutput\\OutputDecorator;\nuse Symfony\\Component\\Console\\Output\\BufferedOutput;\n\n$bufferedOutput = new BufferedOutput();\n$output = new OutputDecorator($bufferedOutput);\n\n$output-\u003einfo('Starting batch process');\n$output-\u003eincrIndent();\n\nforeach (['file1.txt', 'file2.txt', 'file3.txt'] as $index =\u003e $file) {\n    $output-\u003einfo('Processing file %d: %s', $index + 1, $file);\n    $output-\u003eincrIndent();\n\n    if ($file === 'file2.txt') {\n        $output-\u003eerror('Failed to process %s', $file);\n    } else {\n        $output-\u003esuccess('Successfully processed %s', $file);\n    }\n\n    $output-\u003edecrIndent();\n}\n\n$output-\u003eresetIndent();\n$output-\u003einfo('Batch process completed');\n\n// Get the formatted output\necho $bufferedOutput-\u003efetch();\n```\n\n## API Documentation\n\nComplete API documentation with all methods and examples is available in the [project wiki](https://github.com/imponeer/log-data-output-decorator/wiki), which is automatically generated from the source code.\n\n## Testing\n\nRun the test suite:\n\n```bash\ncomposer test\n```\n\nCheck code style compliance:\n\n```bash\ncomposer phpcs\n```\n\nFix code style issues automatically:\n\n```bash\ncomposer phpcbf\n```\n\nRun static analysis:\n\n```bash\ncomposer phpstan\n```\n\n## Contributing\n\nWe welcome contributions! Here's how you can help:\n\n1. **Fork the repository** on GitHub\n2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)\n3. **Make your changes** and add tests if applicable\n4. **Run the test suite** to ensure everything works\n5. **Commit your changes** (`git commit -am 'Add amazing feature'`)\n6. **Push to the branch** (`git push origin feature/amazing-feature`)\n7. **Create a Pull Request**\n\n### Development Guidelines\n\n- Follow PSR-12 coding standards\n- Add tests for new functionality\n- Update documentation for API changes\n- Ensure all tests pass before submitting PR\n\n### Reporting Issues\n\nFound a bug or have a suggestion? Please [open an issue](https://github.com/imponeer/log-data-output-decorator/issues) with:\n\n- Clear description of the problem or suggestion\n- Steps to reproduce (for bugs)\n- Expected vs actual behavior\n- PHP and Symfony Console versions","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Flog-data-output-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimponeer%2Flog-data-output-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimponeer%2Flog-data-output-decorator/lists"}