Skip to content

Commit 00a8689

Browse files
committed
Simple readme
1 parent 5f0c3cb commit 00a8689

File tree

1 file changed

+59
-1
lines changed

1 file changed

+59
-1
lines changed

README.md

+59-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,59 @@
1-
# reactphp-psr-3-stdio
1+
# Standard Out [PSR-3](http://www.php-fig.org/psr/psr-3/) logger for [ReactPHP](https://github.com/reactphp/)
2+
3+
[![Linux Build Status](https://travis-ci.org/WyriHaximus/reactphp-psr-3-stdio.png)](https://travis-ci.org/WyriHaximus/reactphp-psr-3-stdio)
4+
[![Latest Stable Version](https://poser.pugx.org/WyriHaximus/react-psr-3-stdio/v/stable.png)](https://packagist.org/packages/WyriHaximus/react-psr-3-stdio)
5+
[![Total Downloads](https://poser.pugx.org/WyriHaximus/react-psr-3-stdio/downloads.png)](https://packagist.org/packages/WyriHaximus/react-psr-3-stdio/stats)
6+
[![Code Coverage](https://scrutinizer-ci.com/g/WyriHaximus/reactphp-psr-3-stdio/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/WyriHaximus/reactphp-psr-3-stdio/?branch=master)
7+
[![License](https://poser.pugx.org/WyriHaximus/react-psr-3-stdio/license.png)](https://packagist.org/packages/wyrihaximus/react-psr-3-stdio)
8+
[![PHP 7 ready](http://php7ready.timesplinter.ch/WyriHaximus/reactphp-psr-3-stdio/badge.svg)](https://travis-ci.org/WyriHaximus/reactphp-psr-3-stdio)
9+
10+
### Installation ###
11+
12+
To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.
13+
14+
```
15+
composer require wyrihaximus/react-psr-3-stdio
16+
```
17+
18+
## Usage ##
19+
20+
```php
21+
$loop = Factory::create(); // ReactPHP event loop
22+
$logger = StdioLogger::create($loop);
23+
$logger->info('log'); // Writes info log to STDOUT
24+
```
25+
26+
When desired you can hide the log level from output by creating a logger that doesn't write it:
27+
28+
```php
29+
$logger = StdioLogger::create($loop)->withHideLevel(true);
30+
```
31+
32+
## Contributing ##
33+
34+
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
35+
36+
## License ##
37+
38+
Copyright 2017 [Cees-Jan Kiewiet](http://wyrihaximus.net/)
39+
40+
Permission is hereby granted, free of charge, to any person
41+
obtaining a copy of this software and associated documentation
42+
files (the "Software"), to deal in the Software without
43+
restriction, including without limitation the rights to use,
44+
copy, modify, merge, publish, distribute, sublicense, and/or sell
45+
copies of the Software, and to permit persons to whom the
46+
Software is furnished to do so, subject to the following
47+
conditions:
48+
49+
The above copyright notice and this permission notice shall be
50+
included in all copies or substantial portions of the Software.
51+
52+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
53+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
54+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
55+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
56+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
57+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
58+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
59+
OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)