PHPackages                             deniscosmin21/log-service-php - 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. deniscosmin21/log-service-php

ActiveLibrary

deniscosmin21/log-service-php
=============================

v2.0.4(7mo ago)075PHP

Since Aug 12Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/DenisCosmin21/log-service-php)[ Packagist](https://packagist.org/packages/deniscosmin21/log-service-php)[ RSS](/packages/deniscosmin21-log-service-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)DependenciesVersions (26)Used By (0)

Installation

```
composer require deniscosmin21/log-service-php
```

Customization For custom options you should add to .env file :

```
API_PASS_KEY=your_api_key
API_PASS_VALUE=your_api_value
ERROR_NAME=custom_path_to_error_log_file #basic is error.log
INFO_NAME=custom_path_to_info_log_file #basic is info.log
WARNING_NAME=custom_path_to_warning_log_file #basic is warning.log
SUCCESS_NAME=custom_path_to_success_log_file #basic is info.log
CUSTOM_PATH=custom_folder_for_logs #basic is /log_records
SOURCE=the_source_of_log
```

Usage

If you have a php project without laravel you have to use

```
require '../vendor/autoload.php';
```

to use the namespaces from composer packages

Initialization

```
use Deniscosmin21\LogServicePhp\LogData;
```

Specify source

```
use Deniscosmin21\LogServicePhp\LogData;

$logger = new LogData();

LogData::source('source');
```

This is not mandatory to do if you specified the source in the .env file

Specify type of log

You can either use the custom methods that feel like laravel

```
use Deniscosmin21\LogServicePhp\LogData;

LogData::info() #for informational log

LogData::error() #for error log

LogData::warning() #for warning log

LogData::success() #for success log
```

You can even specify the message of the log inside

```
LogData::info('my custom message');
```

Or you can use

```
LogData::details('the_type_of_log_you_want', 'your_log_message');
```

\#the first parameter is the type, and the second parameter are the details For sending notification about a log you can use email method with the parameter a string of emails for example

"," ""

```
LogData::email('your_email_string_list_here');
```

Or you can send an array of emails for example

```
LogData::email($your_email_array_list_here);
```

\#the array should look like this : \[(0) =&gt; 'first\_email', (1) =&gt; 'second\_email'\] By using the email method you can specify as many emails as you want

For sending the notification to sms you can use

```
LogData::sms('07....');
```

But keep in mind that this method makes the log to be sent to sms and to email so the usage should be like this

```
LogData::email('emails')->sms('07....');
```

To use the api credentials you can either use the string for each value

```
LogData::credentials('credentials_key', 'credentials_value');
```

Or you can use an array with the content : \['key' =&gt; 'credentials\_key', 'value' =&gt; 'credentials\_value'\]

```
LogData::credentials(['key' => 'credentials_key', 'value' => 'credentials_value']);
```

It's not mandatory to specify the credentials if you specified them inside the .env file

To send the log after setting all the information just use

```
LogData::send(); #This gets the response of the request too
LogData::chained_metods() #no need for using send
```

Full usage example

```
use Deniscosmin21\LogServicePhp\LogData;

return LogData::info('my_info_log')->source('source')->email('test@gmail.com')->credentials('key', 'value');
```

Or if the .env file is all setted up

```
use Deniscosmin21\LogServicePhp\LogData;

return LogData::info('my_info_log')->email('test@gmail.com');
```

More informations In case of error of the request the logger will return a response with the message specified, and the errors that it has. If any errors happen, the log will be registered locally in the path specified in the .env file or basic paths, with the body of the log : "\[log\_type log, in date : date\_time\_of\_log\] : Detalii : details; Locatie : location of the log.

The .env file should be stored in the root of the directory, else the app will fail

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance62

Regular maintenance activity

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

Every ~16 days

Recently: every ~2 days

Total

25

Last Release

238d ago

Major Versions

v1.3.1 → v2.0.02025-09-05

### Community

Maintainers

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

---

Top Contributors

[![DenisCosmin21](https://avatars.githubusercontent.com/u/154325453?v=4)](https://github.com/DenisCosmin21 "DenisCosmin21 (50 commits)")

### Embed Badge

![Health badge](/badges/deniscosmin21-log-service-php/health.svg)

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

PHPackages © 2026

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