PHPackages                             tswtools/logx - 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. tswtools/logx

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

tswtools/logx
=============

Display the class name and method name in the laravel log

05PHP

Since Dec 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tswtools/logx)[ Packagist](https://packagist.org/packages/tswtools/logx)[ RSS](/packages/tswtools-logx/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Logx
====

[](#logx)

[![Latest Version on Packagist](https://camo.githubusercontent.com/b66ff53f857ce091b4109c1266fca2dc242025a85686d82ddf97dfdb08e8cf4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f747377746f6f6c732f6c6f67782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tswtools/logx)[![Total Downloads](https://camo.githubusercontent.com/d1307c11483d357ee8de5a8e7dca4078c148f1ecd622b6c9a3b8b758c60de3f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f747377746f6f6c732f6c6f67782e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tswtools/logx)[![Build Status](https://camo.githubusercontent.com/6d56f785d7d3f3fd00a05385104be1ec11fa858506362a3a0eb8cdc447953594/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f747377746f6f6c732f6c6f67782f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tswtools/logx)

Display the class name and method name in the laravel log, at the same time, it can conveniently display all kinds of data including JSON, array, etc. Take a look at [contributing.md](contributing.md) to see a to do list.

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

[](#installation)

Via Composer

```
$ composer require tswtools/logx
```

Usage
-----

[](#usage)

Then run these commands to publish assets and config：

```
php artisan vendor:publish --provider="Tswtools\Logx\LogxServiceProvider"
```

Config
------

[](#config)

Filters allow you to filter specified classes or methods

```
Specify the IP address that can be recorded
config/logx/ip:
include : x.x.x.x
exclude : x.x.x.x

Specify the class or method that can be recorded
config/logx/method:
include : XxxxController,XyyyController::*,*::index,show
exclude : XxxxController,XxxxController::*,*::index,show

'*' means that every class or method  is OK
```

log format
----------

[](#log-format)

\[time\]\[ip\]\[class::method\]\[line\] log text.

example:

```
[2020-12-25 13:09:50][127.0.0.1[TestController::index][26] "data1":{"a":1,"b":2}
[2020-12-25 13:10:36][127.0.0.1[TestController::index][25] "data2":[{"a":1,"b":2}]
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits
-------

[](#credits)

- [twstools](https://github.com/tswtools)
- [All Contributors](../../contributors)

License
-------

[](#license)

license. Please see the [license file](license.md) for more information.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.3% 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.

### Community

Maintainers

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

---

Top Contributors

[![wangxj0001](https://avatars.githubusercontent.com/u/19472678?v=4)](https://github.com/wangxj0001 "wangxj0001 (12 commits)")[![tswtools](https://avatars.githubusercontent.com/u/76550654?v=4)](https://github.com/tswtools "tswtools (1 commits)")

### Embed Badge

![Health badge](/badges/tswtools-logx/health.svg)

```
[![Health](https://phpackages.com/badges/tswtools-logx/health.svg)](https://phpackages.com/packages/tswtools-logx)
```

###  Alternatives

[psr/log

Common interface for logging libraries

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

API for OpenTelemetry PHP.

1941.5M276](/packages/open-telemetry-api)[open-telemetry/sdk

SDK for OpenTelemetry PHP.

2328.5M344](/packages/open-telemetry-sdk)

PHPackages © 2026

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