PHPackages                             ahost/logging - 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. ahost/logging

ActiveLibrary

ahost/logging
=============

Create &amp; save log file and store data in database

1.0.1(5y ago)08MITPHP

Since Sep 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Natchaya-Yimtanom/ahost-logging)[ Packagist](https://packagist.org/packages/ahost/logging)[ RSS](/packages/ahost-logging/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Lumen Log Viewer
================

[](#lumen-log-viewer)

Save log file and store log data in database , along with Log Viewer view which can access directly through package's route.

Installation
============

[](#installation)

- ใช้คำสั่ง composer require ใน terminal เพื่อติดตั้ง package

```
composer require ahost/logging

```

- เพิ่ม Service Provider ในไฟล์ `bootstrap/app.php` ในส่วนของ `providers`

```
$app->register(Ahost\Logging\LoggingServiceProvider::class);

```

- เปิดคอมเม้นท์ `withFacades()` และ `withEloquent()` ในไฟล์ `bootstrap/app.php`

```
$app->withFacades();
$app->withEloquent();

```

- รันคำสั่ง custom command ของ package เพื่อทำการตั้งค่าไฟล์ต่างๆโดยอัตโนมัติ ดังนี้

```
php artisan logging:activate

```

Usage
=====

[](#usage)

- เพิ่มคำสั่ง `use Ahost\Logging\BaseLogger;` ในไฟล์ controller ที่ต้องการใช้งานฟังก์ชันของ package
- สร้าง variable ที่สืบทอดฟังก์ชันของ class baselogger ในไฟล์ controller ที่ต้องการ ยกตัวอย่างเช่น

```
protected $baselogger;

    public function __construct(BaseLogger $baselogger){
        $this->baselogger = $baselogger;
    }

```

- เรียกใช้ฟังก์ชัน init() ผ่าน variable ที่สืบทอด class baselogger (เพื่อทำการตั้งค่า path ของ log file)

```
$this->baselogger->init();

```

- เรียกใช้ฟังก์ชันของ baselogger ผ่าน variable ในส่วนที่ต้องการเก็บข้อความ log ยกตัวอย่างเช่น

```
$this->baselogger->info('Information Log Message');

```

- สามารถเข้าดูหน้า Log Viewer ได้ผ่าน `http://.../log/view`

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

2072d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/422bbdf299b83cd78e386b03db50c8a4e1904c84e6eb6b1137e08a7ad689ce89?d=identicon)[NatchayaYimtanom](/maintainers/NatchayaYimtanom)

---

Top Contributors

[![Natchaya-Yimtanom](https://avatars.githubusercontent.com/u/65905726?v=4)](https://github.com/Natchaya-Yimtanom "Natchaya-Yimtanom (12 commits)")

### Embed Badge

![Health badge](/badges/ahost-logging/health.svg)

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

PHPackages © 2026

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