https://github.com/taoso/udplog
syslog udp client for php
https://github.com/taoso/udplog
logging php psr-3 rfc5324 syslog udp
Last synced: about 1 year ago
JSON representation
syslog udp client for php
- Host: GitHub
- URL: https://github.com/taoso/udplog
- Owner: taoso
- License: mit
- Created: 2017-03-14T17:36:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-15T03:35:25.000Z (over 9 years ago)
- Last Synced: 2025-04-05T00:41:16.456Z (about 1 year ago)
- Topics: logging, php, psr-3, rfc5324, syslog, udp
- Language: PHP
- Homepage:
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# udplog
`lvht/udplog` is a [PSR3](http://www.php-fig.org/psr/psr-3/) implementation,
which sending log according [RFC 5424](https://tools.ietf.org/html/rfc5424).
## Install
composer require lvht/udplog
## Usage
```php
facility(LOG_KERN)
->hostname('foo.com')
->procid(8848)
->msgid('demo')
->appname('php');
$log->error('欢迎使用基于UDP的syslog协议发送日志!');
$log->info('欢迎使用基于UDP的syslog协议发送日志!');
$log->debug('欢迎使用基于UDP的syslog协议发送日志!');
$log->emergency('欢迎使用基于UDP的syslog协议发送日志!');
```
## Status
duplog implements PSR3, so the API is stable. And I want to make it v1.0.0.
However, duplog does not support the [STRUCTURED-DATA](https://tools.ietf.org/html/rfc5424#section-6.3).
We will add this support in the future if needed.