PHPackages                             internetpixels/logging-library - 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. internetpixels/logging-library

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

internetpixels/logging-library
==============================

Log applications notices, warnings and errors with this PHP library

1.0.0(8y ago)31.6kPHPPHP &gt;=7.1

Since Dec 28Pushed 8y agoCompare

[ Source](https://github.com/internetpixels/logging-library)[ Packagist](https://packagist.org/packages/internetpixels/logging-library)[ RSS](/packages/internetpixels-logging-library/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (2)Used By (0)

Logging library for PHP
=======================

[](#logging-library-for-php)

Log errors, warnings, notices, info and custom messages with this php logging library. Log into a file, or your MySQL database.

This is a open-source library. Please consider a link to this repository when you're actively using it.

[![License](https://camo.githubusercontent.com/cf76db379873b010c163f9cf1b5de4f5730b5a67/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f6d69742f6d69742e7376673f763d313032)](https://github.com/internetpixels/session-manager)[![Build Status](https://camo.githubusercontent.com/a5d886973a341878311e25ddcf3bcb8fc61ed01b208ed324fed655ef31d5a45b/68747470733a2f2f7472617669732d63692e6f72672f696e7465726e6574706978656c732f6c6f6767696e672d6c6962726172792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/internetpixels/logging-library)[![Maintainability](https://camo.githubusercontent.com/0ecd472064581d53b0c0a20c43ecdd50fd517098e92e3d2707e855f28c37ed76/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36343136643532396637303638326336616664352f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/internetpixels/logging-library/maintainability)

Installation
------------

[](#installation)

Install this PHP logging library by using composer:

```
composer require internetpixels/logging-library

```

Basic examples
--------------

[](#basic-examples)

There are different kind of log messages available in this library. You can log the following messages:

```
$logger     = new LoggerFactory();
// set your adapter in the logger factory, see examples below

$logger->error('Log an error message');
$logger->warning('Log a warning message');
$logger->notice('Log a notice message');
$logger->info('Log an info message');
$logger->custom('Log a custom message');

```

### Log by using the File adapter

[](#log-by-using-the-file-adapter)

The fastest way is logging into a file. You're able to do so with the File adapter.

```
$fileLogger = new \InternetPixels\LoggingLibrary\Adapters\FileLoggerAdapter();
$logger     = new \InternetPixels\LoggingLibrary\Factory\LoggerFactory();
$logger->setAdapter( $fileLogger );

if( $logger->info('Test error')  ) {
	echo 'Logged succesfully';
}

```

### Log by using the MySQL adapter

[](#log-by-using-the-mysql-adapter)

If you want to manage your logging data better, you might want to use the MySQL database adapter. This adapter will create a logging table in your given MySQLi connection.

```
$connection = new \Mysqli('localhost', 'root', 'yourpass', 'logger');

$mysqlLogger = new \InternetPixels\LoggingLibrary\Adapters\MysqlLoggerAdapter( $connection );
$logger     = new \InternetPixels\LoggingLibrary\Factory\LoggerFactory();
$logger->setAdapter( $mysqlLogger );

if( $logger->info('Test info')  ) {
	echo 'Logged succesfully';
}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

3106d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7113270?v=4)[Peter van Wilderen](/maintainers/Petervw)[@Petervw](https://github.com/Petervw)

---

Top Contributors

[![Petervw](https://avatars.githubusercontent.com/u/7113270?v=4)](https://github.com/Petervw "Petervw (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/internetpixels-logging-library/health.svg)

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

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B10.9k](/packages/psr-log)[open-telemetry/api

API for OpenTelemetry PHP.

1938.5M263](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2326.5M317](/packages/open-telemetry-sdk)[illuminated/console-logger

Logging and Notifications for Laravel Console Commands.

8676.7k](/packages/illuminated-console-logger)

PHPackages © 2026

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