{"id":18838879,"url":"https://github.com/grizz-it/log","last_synced_at":"2026-01-28T16:30:18.841Z","repository":{"id":62512770,"uuid":"312103088","full_name":"grizz-it/log","owner":"grizz-it","description":"A logging package for PHP projects.","archived":false,"fork":false,"pushed_at":"2021-02-23T21:14:54.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-30T09:14:58.598Z","etag":null,"topics":["log","logging","php"],"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/grizz-it.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-11T22:14:10.000Z","updated_at":"2021-02-23T21:07:52.000Z","dependencies_parsed_at":"2022-11-02T13:15:20.945Z","dependency_job_id":null,"html_url":"https://github.com/grizz-it/log","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grizz-it%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grizz-it%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grizz-it%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grizz-it%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grizz-it","download_url":"https://codeload.github.com/grizz-it/log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239774335,"owners_count":19694700,"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":["log","logging","php"],"created_at":"2024-11-08T02:41:08.872Z","updated_at":"2026-01-28T16:30:16.776Z","avatar_url":"https://github.com/grizz-it.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.com/grizz-it/log.svg?branch=master)](https://travis-ci.com/grizz-it/log)\n\n# GrizzIT Log\n\nThis package contains an implementation of the `php-unified/log` standard using\nthe `grizz-it/vfs` package. The logger create single line entries in a file\nbased on the log level.\n\n## Installation\n\nTo install the package run the following command:\n\n```\ncomposer require grizz-it/log\n```\n\n## Usage\n\n### Formatters\n\nThe formatters are used to format logs. This package makes two formatters\navailable. The formatters are described by the\n[LogFormatterInterface](src/Common/LogFormatterInterface.php)\n\n#### [JsonFormatter](src/Component/Formatter/JsonFormatter.php)\n\nThe JSON formatter makes a JSON string of the log information, so it can be\npicked up by external systems.\n\n```json\n{\"level\":\"info\",\"message\":\"foo\",\"timestamp\":\"2020-11-11 21:56:46.201300\",\"exception\":\"Exception in...\n```\n\n#### [PlainFormatter](src/Component/Formatter/PlainFormatter.php)\n\nThe plain formatter makes a simple, readable string as a log entry.\n\n```\n[INFO] 2020-11-11 21:54:58.750400 foo Array ( [exception] =\u003e Exception in /...\n```\n\n### Loggers\n\nThe package provides two loggers.\n\n#### [ConfigurableTransitLogger](src/Component/Logger/ConfigurableTransitLogger.php)\n\nThis is a transit logger that can be used to prevent certain log levels from\nbeing emitted. The log levels can be disabled through the constructor\nparameters. After that, additional loggers (that perform the actual logging)\ncan be added by providing them to the `addLogger` method.\n\n#### [FileSystemLogger](src/Component/Logger/FileSystemLogger.php)\n\nThe file system logger is a logger that uses `grizz-it/vfs` to store the logs.\nThe file is determined based on the log level. So all `info` logs are being\nstored in the `info.log` file, all `emergency` logs are stored in\n`emergency.log`, etc..\n\n## Change log\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) and [CODE_OF_CONDUCT](CODE_OF_CONDUCT.md) for details.\n\n## MIT License\n\nCopyright (c) GrizzIT\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrizz-it%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrizz-it%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrizz-it%2Flog/lists"}