PHPackages                             phalcon/logentries - 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. phalcon/logentries

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

phalcon/logentries
==================

Phalcon library to connect and make log entries using https://logentries.com/

v1.2.0(9y ago)10134↓100%3BSD-3-ClausePHPPHP &gt;=5.5

Since Nov 7Pushed 9y ago3 watchersCompare

[ Source](https://github.com/phalcon-orphanage/phalcon-logentries)[ Packagist](https://packagist.org/packages/phalcon/logentries)[ Docs](https://github.com/phalcon/phalcon-logentries)[ RSS](/packages/phalcon-logentries/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (5)Used By (0)

Phalcon Logentries
==================

[](#phalcon-logentries)

[![Software License](https://camo.githubusercontent.com/cb25e110ebc973650d5506bcb5fc974551fa6dff93d0edcc328acbe538789558/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4253442d2d332d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/phalcon/phalcon-logentries/blob/master/LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/cfe5073c1c415eb751e4b83b2dee979e3a22ded248298b5881a3a8f086ac1131/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068616c636f6e2f7068616c636f6e2d6c6f67656e74726965732f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/phalcon/phalcon-logentries)[![Total Downloads](https://camo.githubusercontent.com/ee6b05fa3f132fc941eb8660ee88a24d66784114c7f3dafd7895db8328fa0983/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068616c636f6e2f6c6f67656e74726965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phalcon/logentries)

Phalcon library to connect and make log entries using [Logentries](https://logentries.com/). You can adapt it to your own needs or improve it if you want.

Please write us if you have any feedback.

Thanks.

NOTE
----

[](#note)

The master branch will always contain the latest stable version. If you wish to check older versions or newer ones currently under development, please switch to the relevant branch.

Get Started
-----------

[](#get-started)

### Requirements

[](#requirements)

To use this library on your machine, you need at least:

- [Composer](https://getcomposer.org/)
- PHP &gt;= 5.5
- Latest stable [Phalcon Framework release](https://github.com/phalcon/cphalcon/releases) extension enabled

Development requirements:

- [Codeception](http://codeception.com/)
- [PHP\_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)

### Installation

[](#installation)

Install composer in a common location or in your project:

```
$ curl -s http://getcomposer.org/installer | php
```

Create the composer.json file as follows:

```
{
    "require": {
        "phalcon/logentries": "~1.2"
    }
}
```

Run the composer installer:

```
$ php composer.phar install
```

Setup
-----

[](#setup)

When you have made your account on Logentries. Log in and create a new host with a name that best represents your app. Then, click on your new host and inside that, create a new log file with a name that represents what you are logging, example: `myerrors`. Bear in mind, these names are purely for your own benefit. Under source type, select Token TCP and click Register. You will notice a token appear beside the name of the log, these is a unique identifier that the logging library will use to access that logfile. You can copy and paste this now or later.

Then create adapter instance:

```
use Phalcon\Logger\Adapter\Logentries;

$di->set('logger', function() {
    $logger = new Logentries([
        'token' => getenv('LOGENTRIES_TOKEN'),
        // optional parameters
    ]);

    return $logger;
});
```

`LOGENTRIES_TOKEN` is the token we copied earlier from the Logentries UI. It associates that logger with the log file on Logentries.

### Adding a Custom Host Name and Host ID sent in your PHP log events

[](#adding-a-custom-host-name-and-host-id-sent-in-your-php-log-events)

To Set a custom host name that will appear in your PHP log events as Key / Value pairs pass to the `Logentries::__constructor` the following parameters:

- **host\_name\_enabled**
- **host\_name**
- **host\_id**

For example:

```
use Phalcon\Logger\Adapter\Logentries;

$di->set('logger', function() {
    $logger = new Logentries([
        'token'             => getenv('LOGENTRIES_TOKEN'),
        'host_name_enabled' => true,
        'host_name'         => 'Custom_host_name_here',
        'host_id'           => 'Custom_ID_here_12345'
    ]);

    return $logger;
});
```

The `host_name` param can be left as an empty string, and the Logentries component will automatically attempt to assign a host name from your local host machine and use that as the custom host name.

To set a custom Host ID that will appear in your PHP log events as Key / Value pairs:

- Enter a value instead of the empty string in `host_id => ''`;
- If no `host_id` is set and the empty string is left unaltered, no Host ID or Key / Value pairing will appear in your PHP logs.

Creating a Log
--------------

[](#creating-a-log)

The example below shows how to create a log and add messages to it:

```
use Phalcon\Logger;
use Phalcon\Logger\Adapter\Logentries as LeAdapter;

$logger = new LeAdapter(['token' => 'ad43g-dfd34-df3ed-3d3d3']);

// These are the different log levels available:
$logger->critical('This is a critical message');
$logger->emergency('This is an emergency message');
$logger->debug('This is a debug message');
$logger->error('This is an error message');
$logger->info('This is an info message');
$logger->notice('This is a notice message');
$logger->warning('This is a warning message');
$logger->alert('This is an alert message');

// You can also use the log() method with a Logger constant:
$logger->log('This is another error message', Logger::ERROR);

// If no constant is given, DEBUG is assumed.
$logger->log('This is a message');

// Closes the logger
$logger->close();
```

Tests
-----

[](#tests)

Phosphorum use [Codeception](http://codeception.com/) unit test.

First you need to re-generate base classes for all suites:

```
$ vendor/bin/codecept build
```

Execute all test with `run` command:

```
$ vendor/bin/codecept run
# OR
$ vendor/bin/codecept run --debug # Detailed output
```

More details about Console Commands see [here](http://codeception.com/docs/reference/Commands).

License
-------

[](#license)

Phalcon Logentries is open-sourced software licensed under the [New BSD License](https://github.com/phalcon/phalcon-logentries/blob/master/LICENSE.txt). © Phalcon Framework Team and contributors

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

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 ~249 days

Total

3

Last Release

3337d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.4

v1.1.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/826683026897842e5e89553da75daf5f8b4d0fe030761c876e2c8e2029942f8e?d=identicon)[phalcon](/maintainers/phalcon)

---

Top Contributors

[![sergeyklay](https://avatars.githubusercontent.com/u/1256298?v=4)](https://github.com/sergeyklay "sergeyklay (53 commits)")

---

Tags

adapterlogentrieslogsphalconphplogphalconlogentries

###  Code Quality

TestsCodeception

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phalcon-logentries/health.svg)

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

###  Alternatives

[monolog/monolog

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

21.4k964.9M7.0k](/packages/monolog-monolog)[psr/log

Common interface for logging libraries

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

Symfony MonologBundle

2.9k249.1M1.5k](/packages/symfony-monolog-bundle)[spatie/laravel-activitylog

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

5.8k45.4M309](/packages/spatie-laravel-activitylog)[sentry/sentry

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

1.9k227.1M271](/packages/sentry-sentry)[sentry/sentry-laravel

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

1.3k114.3M154](/packages/sentry-sentry-laravel)

PHPackages © 2026

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