Skip to content

Commit

Permalink
Update README.
Browse files Browse the repository at this point in the history
  • Loading branch information
markrogoyski committed Feb 13, 2017
1 parent 363d725 commit 123a72a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,22 @@ catch (\Exception $e) {
}
```

### Log Channels
Think of channels as namespaces for log lines. If you want to have multiple loggers or applications logging to a single log line, channels are your friend.

Channels can be set in two ways:
* Constructor parameter
* Setter method at any time

```php
// Constructor Parameter
$channel = 'router';
$logger = new SimpleLog\Logger($logfile, $channel);

// Setter method
$logger->setChannel('database');
```

### Debug Features
#### Logging to STDOUT
When developing, you can turn on log output to the screen (STDOUT) as a convenience.
Expand Down

0 comments on commit 123a72a

Please sign in to comment.