PHPackages                             xray-log/php-sdk - 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. xray-log/php-sdk

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

xray-log/php-sdk
================

XRay Log PHP SDK for logging and monitoring

v1.3.1(1y ago)12411MITPHPPHP &gt;=7.2.5

Since Nov 22Pushed 1y ago1 watchersCompare

[ Source](https://github.com/XRay-Log/php-sdk)[ Packagist](https://packagist.org/packages/xray-log/php-sdk)[ RSS](/packages/xray-log-php-sdk/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (1)

XRay Log PHP SDK
================

[](#xray-log-php-sdk)

XRay Log PHP SDK for logging and monitoring applications. This SDK provides a simple way to log various data types with type preservation.

[![Build Status](https://github.com/XRay-Log/php-sdk/workflows/tests/badge.svg)](https://github.com/XRay-Log/php-sdk/actions)[![Total Downloads](https://camo.githubusercontent.com/926f9d8e63246f750480ff5a90fa51916d374173eafe0cee528765192f6ea966/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f787261792d6c6f672f7068702d73646b)](https://packagist.org/packages/xray-log/php-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/a39916f0617815d1201655d72ce00069c7e3d8f85742d01f32065ae70e62f607/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f787261792d6c6f672f7068702d73646b)](https://packagist.org/packages/xray-log/php-sdk)[![License](https://camo.githubusercontent.com/b605b35df6d0adc2bed8a489206faef4b6524a8229b0f2e5c08ac029de7b430e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f787261792d6c6f672f7068702d73646b)](https://packagist.org/packages/xray-log/php-sdk)

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

[](#installation)

You can install the package via composer:

```
composer require xray-log/php-sdk
```

Usage
-----

[](#usage)

### Using Logger Class

[](#using-logger-class)

```
use XRayLog\XRayLogger;

// Initialize logger
$logger = new XRayLogger('Your Project Name');

// Log messages
$logger->info("User logged in");
$logger->error("Something went wrong");
$logger->debug(['user_id' => 1, 'status' => 'active']);
```

### Using Helper Function

[](#using-helper-function)

```
// Set project name (optional)
xray_setup(['project' => 'My Project']);

// Log with default INFO level
xray("Simple message");

// Log with specific level
xray('error', "Something went wrong");
xray('debug', ['user_id' => 1]);
```

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The XRay Log PHP SDK is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

5

Last Release

547d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e46e4e1aad6451424196b24752b88be1cc1f6aa6ae4b05c314140c512d5cc378?d=identicon)[muhammetus](/maintainers/muhammetus)

---

Top Contributors

[![muhammetus](https://avatars.githubusercontent.com/u/5948976?v=4)](https://github.com/muhammetus "muhammetus (8 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xray-log-php-sdk/health.svg)

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

###  Alternatives

[spatie/flare-client-php

Send PHP errors to Flare

177156.9M21](/packages/spatie-flare-client-php)[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[spatie/laravel-flare

Send Laravel errors to Flare

111.2M6](/packages/spatie-laravel-flare)[tobiasdierich/gauge

An easy to use application performance monitor.

14413.1k](/packages/tobiasdierich-gauge)

PHPackages © 2026

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