{"id":18794555,"url":"https://github.com/effectra/log","last_synced_at":"2025-08-10T15:17:11.236Z","repository":{"id":182939628,"uuid":"646473442","full_name":"effectra/log","owner":"effectra","description":"Effectra\\Log is a logging library that provides a simple and flexible way to handle logging in your PHP applications. It implements the PSR-3 LoggerInterface and includes additional features for log handling.","archived":false,"fork":false,"pushed_at":"2023-06-20T14:45:33.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-05-21T16:13:05.949Z","etag":null,"topics":["log","logging","php","psr","psr-3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/effectra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-05-28T14:12:38.000Z","updated_at":"2023-06-20T14:35:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"684f1bd4-4c85-4dba-bbfb-7f50cd37df67","html_url":"https://github.com/effectra/log","commit_stats":null,"previous_names":["effectra/log"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/effectra/log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/effectra","download_url":"https://codeload.github.com/effectra/log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/effectra%2Flog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269740560,"owners_count":24467802,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"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":["log","logging","php","psr","psr-3"],"created_at":"2024-11-07T21:29:46.179Z","updated_at":"2025-08-10T15:17:11.215Z","avatar_url":"https://github.com/effectra.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Effectra\\Log\n\nEffectra\\Log is a logging library that provides a simple and flexible way to handle logging in your PHP applications. It implements the [PSR-3 LoggerInterface](https://www.php-fig.org/psr/psr-3/) and includes additional features for log handling.\n\n## Installation\n\nYou can install the Effectra\\Log library via Composer. Run the following command in your project directory:\n\n```\ncomposer require effectra/log\n```\n\n## Usage\n\nTo use the Effectra\\Log library in your project, follow these steps:\n\n1. Create an instance of the `Logger` class:\n   ```php\n   use Effectra\\Log\\Logger;\n\n   $logger = new Logger('/path/to/log/file.log');\n   ```\n\n2. Start logging messages:\n   ```php\n   $logger-\u003einfo('This is an informational message.');\n   $logger-\u003eerror('An error occurred.', ['context' =\u003e 'additional data']);\n   // ...\n   ```\n\n3. Customize log levels:\n   ```php\n   use Effectra\\Log\\LogLevel;\n\n   $logger-\u003elog(LogLevel::DEBUG, 'Debug message');\n   $logger-\u003elog(LogLevel::WARNING, 'Warning message');\n   // ...\n   ```\n\n4. Set the logger instance on other classes (optional):\n   ```php\n   use Effectra\\Log\\LoggerAware;\n   use Psr\\Log\\LoggerInterface;\n\n   class MyClass implements LoggerAware\n   {\n       public function __construct(LoggerInterface $logger)\n       {\n           $this-\u003esetLogger($logger);\n       }\n\n       // ...\n   }\n   ```\n\nFor more detailed information on the available methods and features, refer to the code documentation and the [PSR-3 LoggerInterface](https://www.php-fig.org/psr/psr-3/) documentation.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the [GitHub repository](https://github.com/effectra/log).\n\n## License\n\nThe Effectra\\Log library is open-source software released under the [MIT License](https://opensource.org/licenses/MIT).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feffectra%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feffectra%2Flog/lists"}