{"id":15029112,"url":"https://github.com/bookiu/monolog-timefile-handler","last_synced_at":"2026-03-15T08:14:43.089Z","repository":{"id":57086307,"uuid":"174961482","full_name":"bookiu/monolog-timefile-handler","owner":"bookiu","description":"Another monolog handler whose filename is base on datetime.","archived":false,"fork":false,"pushed_at":"2020-06-28T03:58:35.000Z","size":13,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T21:48:42.709Z","etag":null,"topics":["logger","logging","monolog","monolog-handler","monolog-library","php7"],"latest_commit_sha":null,"homepage":null,"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/bookiu.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}},"created_at":"2019-03-11T08:55:58.000Z","updated_at":"2021-01-18T06:29:40.000Z","dependencies_parsed_at":"2022-08-25T00:50:35.613Z","dependency_job_id":null,"html_url":"https://github.com/bookiu/monolog-timefile-handler","commit_stats":null,"previous_names":["norduo/monolog-timefile-handler","bookiu/monolog-timefile-handler"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bookiu%2Fmonolog-timefile-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bookiu%2Fmonolog-timefile-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bookiu%2Fmonolog-timefile-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bookiu%2Fmonolog-timefile-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bookiu","download_url":"https://codeload.github.com/bookiu/monolog-timefile-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243338565,"owners_count":20275529,"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":["logger","logging","monolog","monolog-handler","monolog-library","php7"],"created_at":"2024-09-24T20:09:45.252Z","updated_at":"2025-12-26T08:04:11.445Z","avatar_url":"https://github.com/bookiu.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monolog timefile handler\n\n# Installation\n\n`monolog-timefile-handler` is available via composer. Just add the following code to your `composer.json` file under **required** section and execute command `composer update` or you can run:\n\n```bash\ncomposer require yaxin/monolog-timefile-handler\n```\n\n# Usage\n\nThe handler needs some parameters:\n\n- **\\$filename**: This specify the log file name which can specify datetime within `$(datetime_format)`, and the datetime format accepted by php [date()](http://php.net/manual/en/function.date.php) function.\n\n- **\\$level**: An integer type defined by Monolog log level, default is `100` which means `DEBUG`.\n\n- **\\$bubble**: Whether the messages that are handled can bubble up the stack or not, default is `true`.\n\n- **\\$filePermission**: Optional file permissions (default (0644) are only for owner read/write).\n\n- **\\$useLocking**: Try to lock log file before doing any writes, default is `false`.\n\n# Examples\n\n```php\nuse Monolog\\Logger;\nuse Yaxin\\TimefileHandler\\TimefileHandler;\n\n$logger = new Logger('app');\n$handler = new TimefileHandler('/tmp/app_%(Ymd_H).log', Logger::INFO);\n$logger-\u003epushHandler($handler);\n$logger-\u003ewarning('This is a message');\n```\n\nThen you can get the log message in `/tmp/app_\u003cdatatime\u003e.log` file.\n\n# License\n\nThis tool is free software and is distributed under the MIT license. Please have a look at the LICENSE file for further information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbookiu%2Fmonolog-timefile-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbookiu%2Fmonolog-timefile-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbookiu%2Fmonolog-timefile-handler/lists"}