{"id":22477542,"url":"https://github.com/maplephp/log","last_synced_at":"2026-02-16T14:34:23.417Z","repository":{"id":209893081,"uuid":"632542395","full_name":"MaplePHP/Log","owner":"MaplePHP","description":"MaplePHP - PSR-3 Logger","archived":false,"fork":false,"pushed_at":"2025-10-26T11:23:10.000Z","size":44,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-11-16T03:22:07.698Z","etag":null,"topics":["agnostic","lightweight","log","logging","php","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MaplePHP.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}},"created_at":"2023-04-25T16:11:54.000Z","updated_at":"2024-12-01T13:57:37.000Z","dependencies_parsed_at":"2025-05-29T08:46:05.644Z","dependency_job_id":"f66ceda2-4cf3-4cd6-83d8-675804b11c1d","html_url":"https://github.com/MaplePHP/Log","commit_stats":null,"previous_names":["maplephp/log"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/MaplePHP/Log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaplePHP%2FLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaplePHP%2FLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaplePHP%2FLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaplePHP%2FLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MaplePHP","download_url":"https://codeload.github.com/MaplePHP/Log/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MaplePHP%2FLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29510222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T09:05:14.864Z","status":"ssl_error","status_checked_at":"2026-02-16T08:55:59.364Z","response_time":115,"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":["agnostic","lightweight","log","logging","php","psr-3"],"created_at":"2024-12-06T14:11:29.862Z","updated_at":"2026-02-16T14:34:23.382Z","avatar_url":"https://github.com/MaplePHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# MaplePHP - PSR-3 Logger\nPHP PSR-3 Logger library – your reliable companion for efficient logging in PHP applications. This library adheres to the PSR-3 standard, providing a seamless and standardized approach to logging messages across different components of your application.\n\n\n## Log-levels\n\n1. **emergency:** System is unusable\n2. **alert:** Action must be taken immediately\n3. **critical:** Critical conditions\n4. **error:** Runtime errors that do not require immediate action but usually logged and monitored.\n5. **warning:** Exceptional occurrences that are not errors.\n6. **notice:** Normal but significant events.\n7. **info:** Interesting events (User logs in, SQL logs.)\n8. **debug:** Detailed debug information.\n9. **log:** Logs with an arbitrary level.\n\n\n## Stream/file handler\n\n#### Add namespaces\n```php\nuse MaplePHP\\Log\\Logger;\nuse MaplePHP\\Log\\Handlers\\StreamHandler;\n```\n#### Create simple stream logger\n```php\n$log = new Logger(new StreamHandler(\"/path/to/logger.log\"));\n$log-\u003ewarning(\"The user {firstname} has been added.\", [\"firstname\" =\u003e \"John\", \"lastname\" =\u003e \"Doe\"]);\n```\n#### Rotatable log files\nCreate simple stream rotatables loggers. Will create a new log file if size is more than MAX_SIZE (5000 KB) and remove log files if total file count is more than MAX_COUNT 10.\n```php\n$log = new Logger(new StreamHandler(\"/path/to/logger.log\", StreamHandler::MAX_SIZE, StreamHandler::MAX_COUNT));\n$log-\u003ewarning(\"The user {firstname} has been added.\", [\"firstname\" =\u003e \"John\", \"lastname\" =\u003e \"Doe\"]);\n```\n\n## PHP error log handler (error_log())\nYou can (not required) specify a log file location in ErrorLogHandler. If argument is empty, then server default location.\n\n#### Add namespaces\n```php\nuse MaplePHP\\Log\\Logger;\nuse MaplePHP\\Log\\Handlers\\ErrorLogHandler;\n```\n```php\n$log = new Logger(new ErrorLogHandler(\"/path/to/logger.log\"));\n$log-\u003ewarning(\"The user {firstname} has been added.\", [\"firstname\" =\u003e \"John\", \"lastname\" =\u003e \"Doe\", \"data\" =\u003e [\"city\" =\u003e \"Stockholm\", \"coor\" =\u003e \"122,1212\"]]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaplephp%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaplephp%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaplephp%2Flog/lists"}