Skip to content

Commit

Permalink
Some documentation cleanup, will require more.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Jan 5, 2017
1 parent ecb4398 commit f34b22e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This library is loosely based upon the [official GO client](https://github.com/h
|PHPConsulAPI Version|Consul Version|
|---|---|
|0.3.x|0.6.4|
|dev-master|0.7.0|
|0.4.x|0.7.x|

## Composer

Expand All @@ -22,7 +22,7 @@ Require Entry:
```json
{
"require": {
"dcarbone/php-consul-api": "dev-master"
"dcarbone/php-consul-api": "@stable"
}
}
```
Expand Down Expand Up @@ -94,8 +94,8 @@ Next, construct a [Consul](./src/Consul.php) object:
$consul = new \DCarbone\PHPConsulAPI\Consul($config);
```

*NOTE*: If you do not create your own config object, [Consul](./src/Consul.php#L59) will create it's own
using [Config::newDefaultConfig()](./src/Config.php#L142).
*NOTE*: If you do not create your own config object, [Consul](./src/Consul.php#L72) will create it's own
using [Config::newDefaultConfig()](./src/Config.php#L145) and attempt to locate a suitable HTTP Client.

Once constructed, you interact with each Consul API via it's corresponding Client class:

Expand Down
17 changes: 4 additions & 13 deletions docs/LOGGING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@ Logging is handled with the [Logger](../src/Logger.php) class. To register a ne
[PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) compliant and implement
the [Psr\LoggerInterface](https://github.com/php-fig/log/blob/master/Psr/Log/LoggerInterface.php ) interface.

## Provided Loggers
## Debug Logger

There are a few Logger classes provided by this lib:
There is a single logger provided, the [FileDebugLogger](../src/FileDebugLogger.php)

- [FileLogger](../src/FileLogger.php)
- [PHPLogger](../src/PHPLogger.php)
- [SocketLogger](../src/SocketLogger.php)

## Default Logger

For quick and lazy debugging or the like, you may optionally call [Logger::addDefaultLogger](../src/Logger.php#L73).
This creates a new [FileLogger](../src/FileLogger.php) that writes to `var/logs/php-consul-api.log`.
To enable this logger, execute [Logger::addDebugLogger()](../src/Logger.php#L52)

## Adding Loggers

You may add a logger by calling [Logger::addLogger](../src/Logger.php#L112)

##
You may add a logger by calling [Logger::addLogger](../src/Logger.php#L90)

0 comments on commit f34b22e

Please sign in to comment.