PHPackages                             drcayman/custom\_logs - 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. drcayman/custom\_logs

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

drcayman/custom\_logs
=====================

基于monolog 支持文件按照 大小 天 小时进行切割

01PHP

Since Mar 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/drcayman/custom_logs)[ Packagist](https://packagist.org/packages/drcayman/custom_logs)[ RSS](/packages/drcayman-custom-logs/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)DependenciesVersions (1)Used By (0)

custom\_logs
============

[](#custom_logs)

支持按照文件大小 时间切割日志

示例
==

[](#示例)

```
require 'vendor/autoload.php';
use drcayman\custom_logs\Log;
Log::initialize();
$data['message'] = "111";

Log::record($data); //连续记录多次
Log::FlushLogs(); //最后写入日志

```

```
* @param int $file_size  文件切割大小
* @param bool $rotate_hourly 是否按小时切分文件
* @param string $file_prefix 生成的日志文件前缀
* @param FormatterInterface $formatter 格式化组件
* @return void
Log::initialize($file_directory = '.', $file_size = 0, $rotate_hourly = false, $file_prefix = '',FormatterInterface $formatter = null);

```

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![drcayman](https://avatars.githubusercontent.com/u/9761385?v=4)](https://github.com/drcayman "drcayman (3 commits)")

### Embed Badge

![Health badge](/badges/drcayman-custom-logs/health.svg)

```
[![Health](https://phpackages.com/badges/drcayman-custom-logs/health.svg)](https://phpackages.com/packages/drcayman-custom-logs)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.1k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M137](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

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