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

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

logentries/logentries
=====================

Logging library for use with Logentries

v1.6(11y ago)30325.7k—9.3%16[2 PRs](https://github.com/logentries/le_php/pulls)2MITPHP

Since Jun 17Pushed 6y ago16 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (2)

Logging to Logentries with Php [![Build Status](https://camo.githubusercontent.com/7e1313ff42e7226b2bb7de86e9d71c63050610b59453d9c3ac0b003b0e9b9be5/68747470733a2f2f7472617669732d63692e6f72672f6c6f67656e74726965732f6c655f7068702e706e67)](https://travis-ci.org/logentries/le_php)
=====================================================================================================================================================================================================================================================================================

[](#logging-to-logentries-with-php-)

*This plug in will no longer be officially supported or maintained by Logentries.*

With these simple steps you can send your Php application logs to Logentries.

Firsly you must register an account on Logentries.com, this only takes a few seconds.

Logentries Setup
----------------

[](#logentries-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.

Download
--------

[](#download)

This repo can be found on packagist here:

Parameter Setup
---------------

[](#parameter-setup)

Inside the `le_php-master` folder, open `logentries.php` as you need to fill in a parameter, `LOGENTRIES_TOKEN`.

`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:

Inside the `le_php-master` folder, open `logentries.php` and fill in the parameters as follows:

```
$HOST_NAME_ENABLED = true;

$HOST_NAME = "Custom_host_name_here";

$HOST_ID = "Custom_ID_here_12345";

```

The $HOST\_NAME constant can be left as an empty string, and the library 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.

Sending your PHP Log Events To DataHub
--------------------------------------

[](#sending-your-php-log-events-to-datahub)

You can send your PHP log events to your Logentries DataHub.
To do this you must set three user defined constants in the logentries.php file

```
1. Change the $DATAHUB_ENABLED constant to true as in $DATAHUB_ENABLED = true;
2. Set the IP Address of your DataHub machine in $DATAHUB_IP_ADDRESS = "";
3. Set the Port for communicating with DataHub (10000 default) in $DATAHUB_PORT = 10000;

```

If you change the $DATAHUB\_PORT from port 10000, you will have to change your settings port on your DataHub machine, specifically in the DataHub local config file in /etc/leproxy/leproxyLocal.config then restart leproxy - sudo service leproxy restart

Code Setup
----------

[](#code-setup)

Now you need to download the library from the Downloads Tab, unzip and place the folder in your apps directory.

To use it in your code, enter the following lines, making changes accordingly if you place it in a different location.

```
require dirname(__FILE__) . '/le_php-master/logentries.php';

// The following levels are available
$log->Debug(" ");
$log->Info(" ");
$log->Notice(" ");
$log->Warn(" ");
$log->Crit(" ");
$log->Error(" ");
$log->Alert(" ");
$log->Emerg(" ");

```

updated 2014-09-03 11:55

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community25

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 82.7% 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

Unknown

Total

1

Last Release

4354d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/29cfc6f37ad57749b061114fa7ac931d9635a8d334ac403b03f80219117433b8?d=identicon)[MarkLC](/maintainers/MarkLC)

---

Top Contributors

[![MarkLC-r7](https://avatars.githubusercontent.com/u/837094?v=4)](https://github.com/MarkLC-r7 "MarkLC-r7 (43 commits)")[![pugwonk](https://avatars.githubusercontent.com/u/224233?v=4)](https://github.com/pugwonk "pugwonk (4 commits)")[![rsheng-r7](https://avatars.githubusercontent.com/u/41004793?v=4)](https://github.com/rsheng-r7 "rsheng-r7 (2 commits)")[![4d47](https://avatars.githubusercontent.com/u/729919?v=4)](https://github.com/4d47 "4d47 (1 commits)")[![gearoidof](https://avatars.githubusercontent.com/u/451408?v=4)](https://github.com/gearoidof "gearoidof (1 commits)")[![sylwit](https://avatars.githubusercontent.com/u/395413?v=4)](https://github.com/sylwit "sylwit (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[ekino/newrelic-bundle

Integrate New Relic into Symfony2

28111.2M8](/packages/ekino-newrelic-bundle)

PHPackages © 2026

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