PHPackages                             khuetd/m2-custom-log - 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. khuetd/m2-custom-log

ActiveMagento2-module[Logging &amp; Monitoring](/categories/logging)

khuetd/m2-custom-log
====================

Improve the log for magento 2 with custom format

0.0.6(6y ago)0223OSL-3.0PHPPHP &gt;=7.0

Since Apr 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/khuebt/custom-logger-m2)[ Packagist](https://packagist.org/packages/khuetd/m2-custom-log)[ RSS](/packages/khuetd-m2-custom-log/feed)WikiDiscussions master Synced 3w ago

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

Mage2 Module Ktd LogHandler
===========================

[](#mage2-module-ktd-loghandler)

```
``ktd/custom-log``

```

- [Main Functionalities](#markdown-header-main-functionalities)
- [Installation](#markdown-header-installation)
- [Configuration](#markdown-header-configuration)
- [Specifications](#markdown-header-specifications)
- [Attributes](#markdown-header-attributes)

Main Functionalities
--------------------

[](#main-functionalities)

Improve the log for magento 2 with custom format

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

[](#installation)

\* = in production please use the `--keep-generated` option

### Type 1: Zip file

[](#type-1-zip-file)

- Unzip the zip file in `app/code/Ktd`
- Enable the module by running `php bin/magento module:enable Ktd_LogHandler`
- Apply database updates by running `php bin/magento setup:upgrade`\*
- Flush the cache by running `php bin/magento cache:flush`

### Type 2: Composer

[](#type-2-composer)

- Make the module available in a composer repository for example:
    - private repository `repo.magento.com`
    - public repository `packagist.org`
    - public github repository as vcs
- Add the composer repository to the configuration by running `composer config repositories.repo.magento.com composer https://repo.magento.com/`
- Install the module composer by running `composer require ktd/custom-log`
- enable the module by running `php bin/magento module:enable Ktd_LogHandler`
- apply database updates by running `php bin/magento setup:upgrade`\*
- Flush the cache by running `php bin/magento cache:flush`

Configuration
-------------

[](#configuration)

Use
---

[](#use)

```
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
   /** @var \Ktd\LogHandler\Helper\Data $log */
$log = $objectManager->get('\Ktd\LogHandler\Helper\Data');

$log->setFuncDebug('saleorder'); //set filename
$logType = 'ORDER';
$logApiType = 'SO-ORDER';

$req = ['sample' => 1];
$res = ['success' => 1];

$apiname = 'http://URL_API';
$req = json_encode($req);
$res = json_encode($res);

$log->debuglog($logType, array(
    $logApiType,
    "API : $apiname",
    "REQ : $req",
    "RES : $res"
));

```

Result in log
-------------

[](#result-in-log)

```
Log path: MAGENTO_ROOT_FOLDER/var/log/api/saleorder_debug_2020-04-05.log

2020-04-05 13:08:25|DEBUG|8aprmocv1b38g4n3d809m8pr79|ORDER|SO-ORDER|API : http://URL_API|REQ : {"sample":1}|RES : {"success":1}

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

5

Last Release

2281d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16019577?v=4)[TDK](/maintainers/khuebt)[@khuebt](https://github.com/khuebt)

---

Top Contributors

[![khuebt](https://avatars.githubusercontent.com/u/16019577?v=4)](https://github.com/khuebt "khuebt (11 commits)")

### Embed Badge

![Health badge](/badges/khuetd-m2-custom-log/health.svg)

```
[![Health](https://phpackages.com/badges/khuetd-m2-custom-log/health.svg)](https://phpackages.com/packages/khuetd-m2-custom-log)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k203.8M358](/packages/symfony-monolog-bridge)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[illuminate/log

The Illuminate Log package.

6225.3M623](/packages/illuminate-log)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

2587.9k](/packages/graycore-magento2-stdlogging)

PHPackages © 2026

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