Update Log:1.0 notice
This commit is contained in:
parent
61b74d5bcf
commit
42c9f91b24
|
@ -1,7 +1,8 @@
|
|||
```yaml
|
||||
module: log
|
||||
version: 1.0
|
||||
requires: null
|
||||
requires:
|
||||
- filedriver: 1.0
|
||||
```
|
||||
|
||||
Overview
|
||||
|
@ -23,17 +24,7 @@ Log files are located at `/build/log/log/{logfile}.php`.
|
|||
|
||||
Usage
|
||||
----
|
||||
> 1. Include the autoloader
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
require_once '../autoloader.php';
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
> 2. Load the `Log` class
|
||||
> ### 1. Load the `Log` class
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
@ -44,26 +35,32 @@ Usage
|
|||
|
||||
```
|
||||
|
||||
> 3. Fetch the log file you want (_"error"_ in this example)
|
||||
> ### 2. Select the log file you want
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
...
|
||||
|
||||
/* Selects the 'error' log file
|
||||
*
|
||||
* The target file is /build/log/log/error.log
|
||||
*/
|
||||
Log::get('error');
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
> 3. log something on a specific log file (_"error"_ in this example)
|
||||
Note: If you do not give any argument to the `Log::get` method, it will use `default` as default.
|
||||
|
||||
> ### 3. log something on a specific log file (_"error"_ in this example)
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
...
|
||||
|
||||
/* Logs a new entry into the log file /build/log/log/error.log */
|
||||
Log::get('error')->log('some message', 'optional_tag');
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
Note: If the `message` argument is missing, it will be `...` by default, the tag if not set will be `default`.
|
||||
|
|
Loading…
Reference in New Issue