PHPackages                             phputil/logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. phputil/logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

phputil/logger
==============

A very simple logger

1.3(9y ago)0199LGPL-3PHPPHP &gt;=5.2.0

Since Jul 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/thiagodp/logger)[ Packagist](https://packagist.org/packages/phputil/logger)[ Docs](http://github.com/thiagodp/logger)[ RSS](/packages/phputil-logger/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (0)

Logger
======

[](#logger)

A very simple logger for PHP. No magic configuration required. Just the basic features you need most.

Provided interfaces and classes:

- [phputil\\Logger](https://github.com/thiagodp/logger/blob/master/lib/Logger.php) interface
- [phputil\\BaseLogger](https://github.com/thiagodp/logger/blob/master/lib/BaseLogger.php) abstract class
- [phputil\\TextFileLogger](https://github.com/thiagodp/logger/blob/master/lib/TextFileLogger.php) class
- [phputil\\FakeLogger](https://github.com/thiagodp/logger/blob/master/lib/FakeLogger.php) class (v1.1+)
- [phputil\\EchoLogger](https://github.com/thiagodp/logger/blob/master/lib/EchoLogger.php) class (v1.3+)

Available log methods:

- `bool debug( string $message, Exception $e = null, array $context = array() );`
- `bool info( string $message, Exception $e = null, array $context = array() );`
- `bool warn( string $message, Exception $e = null, array $context = array() );`
- `bool error( string $message, Exception $e = null, array $context = array() );`
- `bool log( string $logType, string $message, Exception $e = null, array $context = array() );`

### Installation

[](#installation)

```
composer require phputil/logger
```

### Example 1

[](#example-1)

```
