{"id":36969438,"url":"https://github.com/arashdalir/php-psr3log","last_synced_at":"2026-01-13T21:10:13.522Z","repository":{"id":56949685,"uuid":"136921267","full_name":"arashdalir/php-psr3log","owner":"arashdalir","description":"PSR-3 Compatible Log Library with SysLog over UDP Client","archived":false,"fork":true,"pushed_at":"2018-06-13T10:03:57.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-16T10:37:00.990Z","etag":null,"topics":["php","psr3","syslog","syslog-client"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"taoso/udplog","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arashdalir.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":"2018-06-11T12:10:48.000Z","updated_at":"2018-06-13T09:55:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arashdalir/php-psr3log","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arashdalir/php-psr3log","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashdalir%2Fphp-psr3log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashdalir%2Fphp-psr3log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashdalir%2Fphp-psr3log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashdalir%2Fphp-psr3log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arashdalir","download_url":"https://codeload.github.com/arashdalir/php-psr3log/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arashdalir%2Fphp-psr3log/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28400972,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T14:36:09.778Z","status":"ssl_error","status_checked_at":"2026-01-13T14:35:19.697Z","response_time":56,"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":["php","psr3","syslog","syslog-client"],"created_at":"2026-01-13T21:10:12.484Z","updated_at":"2026-01-13T21:10:13.517Z","avatar_url":"https://github.com/arashdalir.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PHP-Psr3Log\n\n`ArashDalir\\Psr3Log` is a [PSR3](http://www.php-fig.org/psr/psr-3/) implementation,\nwhich sending log according [RFC 5424](https://tools.ietf.org/html/rfc5424).\nThis library forks the implementation of UDP-Based SysLog library implemented as [lvht\\updlog](https://github.com/lvht/udplog), generalises it and allows further extension of the base system.\n\n## Install\n\nUse following command to add the repository to your project:\n\n\tcomposer require arashdalir/php-psr3log:dev-master\n\n\nOr add following line to your composer.json:\n\n```json\n{\n  \"require\": {\n     \"arashdalir/php-psr3log\": \"dev-master\"\n  }\n}\n```\n## Usage\nCurrently, there is only one realization of Psr3Log Handlers for SysLog over UDP format and local SysLog.\n\n### Local SysLog:\nBy not defining an address when creating an object, the object tries to write the values in local syslog.\n\n### UDP-Based SysLog Client:\nThe constructor function accepts an IP-Address and a port where the syslog server is, and will send logs to the remote server.\n\n#### Usage on Windows:\nPlease note that on Windows [only LOG_USER facility is allowed](http://php.net/manual/en/function.openlog.php). Using other facilities will throw an Exception of type `ArashDalir\\Handler\\SysLog\\InvalidFacilityException`, if the second parameter for `setFacility($facility, $os_form)` is set to true.\n\n```php\n\u003c?php\ninclude 'vendor/autoload.php';\n\n$udp = new ArashDalir\\Handler\\SysLog\\SysLog('127.0.0.1');\n$udp-\u003egetLogMessage()-\u003esetFacility(LOG_AUTH, false)\n    -\u003esetVersion(\\ArashDalir\\Handler\\SysLog\\SysLogMessage::VERSION_1) // available as of V1.1.0\n    -\u003esetHostname('ada')\n    -\u003esetProcessId(8848)\n    -\u003esetMessageId('demo')\n    -\u003esetAppName('php');\n\n$udp-\u003eerror('UDP SysLog Error Test');\n$udp-\u003einfo('UDP SysLog Info Test');\n$udp-\u003edebug('UDP SysLog Debug Test');\n$udp-\u003eemergency('UDP SysLog Emergency Test');\n\n$local = new \\ArashDalir\\Handler\\SysLog\\SysLog();\n$local-\u003egetLogMessage()-\u003esetFacility(LOG_USER)\n    -\u003esetHostname('ada')\n    -\u003esetProcessId(8848)\n    -\u003esetMessageId('demo')\n    -\u003esetAppName('php');\n\n$local-\u003eerror('Local SysLog Error Test');\n$local-\u003einfo('Local SysLog Info Test');\n$local-\u003edebug('Local SysLog Debug Test');\n$local-\u003eemergency('Local SysLog Emergency Test');\n```\n\n## Status\nPsr3Log extends Udplog. It provides a PSR-3 conform implementation of a logger. As Udplog, Psr3Log doesn't support [STRUCTURED-DATA](https://tools.ietf.org/html/rfc5424#section-6.3). Hopefully the future releases will cover this up...\n\n## Versions\n\n### v1.1.0:\n * added support for [RFC5424 (syslog V1)](https://tools.ietf.org/html/rfc5424)\n * message timestamp can be set manually if psr3log-\u003elog function is used directly - mainly implemented for extension purposes, so that log messages from other loggers can be fed into this library.\n \n\n### v1.0.0:\nfirst stable release - following features implemented\n * local syslog entries\n * udp-based syslog client\n * based on [RFC3164 (syslog V0)](https://www.ietf.org/rfc/rfc3164.txt)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashdalir%2Fphp-psr3log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farashdalir%2Fphp-psr3log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farashdalir%2Fphp-psr3log/lists"}