Skip to content

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

License

Notifications You must be signed in to change notification settings

xRay-Log/php-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 Total Downloads Latest Stable Version License

Installation

You can install the package via composer:

composer require xray-log/php-sdk

Usage

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

// 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

composer test

License

The XRay Log PHP SDK is open-sourced software licensed under the MIT license.

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages