{"id":35016553,"url":"https://github.com/v-dem/queasy-log","last_synced_at":"2026-05-23T04:32:09.138Z","repository":{"id":57076418,"uuid":"102343862","full_name":"v-dem/queasy-log","owner":"v-dem","description":"QuEasy PHP Framework - Logger","archived":false,"fork":false,"pushed_at":"2025-02-11T06:59:04.000Z","size":72,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-21T19:08:47.059Z","etag":null,"topics":["log","logger","logging","nested-loggers","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":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v-dem.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}},"created_at":"2017-09-04T09:29:28.000Z","updated_at":"2025-02-07T10:31:27.000Z","dependencies_parsed_at":"2024-12-17T06:19:57.201Z","dependency_job_id":"b0f1dbb7-f210-48eb-b14c-05f0b46ed709","html_url":"https://github.com/v-dem/queasy-log","commit_stats":{"total_commits":110,"total_committers":3,"mean_commits":"36.666666666666664","dds":"0.054545454545454564","last_synced_commit":"9165a7ab34491be5822be82fd20e5843dc80f7dd"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/v-dem/queasy-log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-dem%2Fqueasy-log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-dem%2Fqueasy-log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-dem%2Fqueasy-log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-dem%2Fqueasy-log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v-dem","download_url":"https://codeload.github.com/v-dem/queasy-log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v-dem%2Fqueasy-log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33383232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-23T04:15:53.637Z","status":"ssl_error","status_checked_at":"2026-05-23T04:15:53.242Z","response_time":53,"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":["log","logger","logging","nested-loggers","php","psr-3"],"created_at":"2025-12-27T05:21:56.902Z","updated_at":"2026-05-23T04:32:09.090Z","avatar_url":"https://github.com/v-dem.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/c7673721ff064b109ffa5d1f4fa92801)](https://app.codacy.com/manual/v-dem/queasy-log?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=v-dem/queasy-log\u0026utm_campaign=Badge_Grade_Dashboard)\n[![codecov](https://codecov.io/gh/v-dem/queasy-log/branch/master/graph/badge.svg)](https://codecov.io/gh/v-dem/queasy-log)\n[![Total Downloads](https://poser.pugx.org/v-dem/queasy-log/downloads)](https://packagist.org/packages/v-dem/queasy-log)\n[![Latest Stable Version](https://img.shields.io/github/v/release/v-dem/queasy-log)](https://packagist.org/packages/v-dem/queasy-log)\n[![License](https://poser.pugx.org/v-dem/queasy-log/license)](https://packagist.org/packages/v-dem/queasy-log)\n\n# [QuEasy PHP Framework](https://github.com/v-dem/queasy-framework/) - Logger\n\n## Package `v-dem/queasy-log`\n\nContains logger classes compatible with [PSR-3](https://www.php-fig.org/psr/psr-3/) logger interface. Currently file system and console loggers are implemented.\nThis package includes these types of logging:\n\n*   Logger (base class, can be used as a container for other loggers)\n*   FileSystemLogger\n*   ConsoleLogger (supports ANSI color codes)\n*   SimpleMailLogger (encapsulates `mail()` function)\n\n### Features\n\n*   PSR-3 compatible.\n*   Easy to use.\n*   Easy to extend.\n*   Nested loggers support.\n*   Configurable output message format.\n\n### Requirements\n\n*   PHP version 5.3 or higher\n\n### Documentation\n\nSee our [Wiki page](https://github.com/v-dem/queasy-log/wiki).\n\n### Installation\n\n    composer require v-dem/queasy-log:master-dev\n\n### Usage\n\nLet's imagine we have the following `config.php`:\n\n```php\nreturn [\n    'logger' =\u003e [\n        'class' =\u003e queasy\\log\\FileSystemLogger::class, // Logger class\n        'processName' =\u003e 'test', // Process name, to differentiate log messages from different sources\n        'minLevel' =\u003e Psr\\Log\\LogLevel::WARNING, // Message's minimum acceptable log level\n        'path' =\u003e 'debug.log' // Path to logger output file\n    ]\n];\n```\n\n#### Creating logger instance\n\nInclude Composer autoloader:\n\n```php\nrequire_once('vendor/autoload.php');\n```\n\nCreate config instance (using [`v-dem/queasy-config`](https://github.com/v-dem/queasy-config/) package):\n\n```php\n$config = new queasy\\config\\Config('config.php');\n```\n\nOr using arrays:\n\n```php\n$config = include('config.php');\n```\n\nCreate logger instance (in this case `class` option can be omitted and will be ignored):\n\n```php\n$logger = new queasy\\log\\Logger($config);\n```\n\nAnother way to create logger instance (it will create an instance of `$config-\u003elogger-\u003eclass`, by default `queasy\\log\\Logger`\nas an aggregate logger will be used):\n\n```php\n$logger = queasy\\log\\Logger::create($config);\n```\n\n\u003e `FileSystemLogger` and `ConsoleLogger` have default settings and can be used without config. Default log file path for\n\u003e `FileSystemLogger` is `debug.log`, default min log level is `Psr\\Log\\LogLevel::DEBUG` and max is `LogLevel::EMERGENCY`.\n\n#### Writing messages to log\n\nOutput warning message:\n\n```php\n$logger-\u003ewarning('Test warning message.');\n```\n\nIn `debug.log` you'll see something like this:\n\n    2017-12-24 16:13:09.302334 EET test [] [] [WARNING] Test warning message.\n\n#### Chain log messages\n\n```php\n$logger\n    -\u003ewarning('going strange')\n    -\u003eerror('cannot connect to the database')\n    -\u003eemergency('the website is down');\n```\n\n#### Using composite/nested loggers\n\n`config.php`:\n```php\nreturn [\n    [\n        'class' =\u003e queasy\\log\\FileSystemLogger::class,\n        'path' =\u003e 'debug.full.log',\n        'minLevel' =\u003e Psr\\Log\\LogLevel::DEBUG,\n        [\n            'class' =\u003e queasy\\log\\ConsoleLogger::class,\n            'minLevel' =\u003e Psr\\Log\\LogLevel::INFO\n        ], [\n            'class' =\u003e queasy\\log\\SimpleMailLogger::class,\n            'minLevel' =\u003e Psr\\Log\\LogLevel::ALERT,\n            'mailTo' =\u003e 'john.doe@example.com',\n            'subject' =\u003e 'Website Alert'\n        ]\n    ], [\n        'class' =\u003e queasy\\log\\FileSystemLogger::class,\n        'path' =\u003e 'debug.log',\n        'minLevel' =\u003e Psr\\Log\\LogLevel::INFO\n    ]\n];\n```\n\nUsage:\n```php\n$config = new queasy\\config\\Config('config.php');\n$logger = new queasy\\log\\Logger($config);\n$logger-\u003einfo('Hello, world!');\n```\n\n#### Using date/time in log file name (note \"%s\" there, it will be replaced by current date and/or time formatted as described in `timeLabel`)\n\n`config.php`:\n```php\nreturn [\n    [\n        'class' =\u003e queasy\\log\\FileSystemLogger::class,\n        'path' =\u003e 'debug-full.%s.log',\n        'timeLabel' =\u003e 'Y-m-d',\n        'minLevel' =\u003e Psr\\Log\\LogLevel::DEBUG\n    ]\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-dem%2Fqueasy-log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv-dem%2Fqueasy-log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-dem%2Fqueasy-log/lists"}