PHPackages                             vakata/log - 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. vakata/log

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

vakata/log
==========

A file logger class

3.0.2(9y ago)360MITPHPPHP &gt;=5.4.0

Since Dec 8Pushed 9y ago2 watchersCompare

[ Source](https://github.com/vakata/log)[ Packagist](https://packagist.org/packages/vakata/log)[ Docs](https://github.com/vakata/log)[ RSS](/packages/vakata-log/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (10)Used By (0)

log
===

[](#log)

[![Latest Version on Packagist](https://camo.githubusercontent.com/197afc94692e6547ec150e70b6d2ceb3a61aad87c3d2c054aa3f63c0a6741455/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f76616b6174612f6c6f672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vakata/log)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/33708fafd742f994ef18bccef9d35b9aa34918afa4cd3b96edd40b47f500a25d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f76616b6174612f6c6f672f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/vakata/log)[![Code Climate](https://camo.githubusercontent.com/962d1242bb5cd0bf344218f20e80eb18f8fe2dd737fcd13bf90c165528239e7b/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f76616b6174612f6c6f672e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/log)[![Tests Coverage](https://camo.githubusercontent.com/b73760c89e9e5fe39bd46562af9400e1a3bc90f6b7b56811e273485c857fe884/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f636f7665726167652f6769746875622f76616b6174612f6c6f672e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/vakata/log)

A file logger class.

Install
-------

[](#install)

Via Composer

```
$ composer require vakata/log
```

Usage
-----

[](#usage)

```
// create an instance
// by default all error levels are logged to the default "error_log" location
$log = new \vakata\log\Log();
// log a message with some params
$log->debug('Just some info', ['context'=>'params']);
// add some additional context for all future calls
$log->addContext(['context'=>'for all future logs']);
// directly logging exceptions works too
try {
    throw new Exception('Some exception');
}
catch (\Exception $e) {
    $log->error($e);
}

// you can optionally make sure only certain error levels are logged
// and also specify a file for the log
$log = new \vakata\log\Log(
    \vakata\log\Log::ALL ^ \vakata\log\Log::DEBUG, // we log everything but debug
    __DIR__ . '/path/to.log'
);
```

Read more in the [API docs](docs/README.md)

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [vakata](https://github.com/vakata)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~40 days

Recently: every ~26 days

Total

9

Last Release

3533d ago

Major Versions

1.0.3 → 2.0.02016-07-12

2.0.1 → 3.0.02016-08-03

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/146052?v=4)[Ivan Bozhanov](/maintainers/vakata)[@vakata](https://github.com/vakata)

---

Top Contributors

[![vakata](https://avatars.githubusercontent.com/u/146052?v=4)](https://github.com/vakata "vakata (19 commits)")

---

Tags

logvakata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vakata-log/health.svg)

```
[![Health](https://phpackages.com/badges/vakata-log/health.svg)](https://phpackages.com/packages/vakata-log)
```

###  Alternatives

[monolog/monolog

Sends your logs to files, sockets, inboxes, databases and various web services

21.4k997.8M7.9k](/packages/monolog-monolog)[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[symfony/monolog-bundle

Symfony MonologBundle

2.9k258.2M1.7k](/packages/symfony-monolog-bundle)[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.9k50.2M444](/packages/spatie-laravel-activitylog)[sentry/sentry

PHP SDK for Sentry (http://sentry.io)

1.9k240.0M315](/packages/sentry-sentry)[sentry/sentry-laravel

Laravel SDK for Sentry (https://sentry.io)

1.3k122.6M186](/packages/sentry-sentry-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
