PHPackages                             yaxin/monolog-timefile-handler - 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. yaxin/monolog-timefile-handler

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

yaxin/monolog-timefile-handler
==============================

A monolog handler

1.0.0(5y ago)123MITPHPPHP ^7CI failing

Since Mar 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/yaxin-cn/monolog-timefile-handler)[ Packagist](https://packagist.org/packages/yaxin/monolog-timefile-handler)[ RSS](/packages/yaxin-monolog-timefile-handler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (2)Versions (7)Used By (0)

Monolog timefile handler
========================

[](#monolog-timefile-handler)

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

[](#installation)

`monolog-timefile-handler` is available via composer. Just add the following code to your `composer.json` file under **required** section and execute command `composer update` or you can run:

```
composer require yaxin/monolog-timefile-handler
```

Usage
=====

[](#usage)

The handler needs some parameters:

- **$filename**: This specify the log file name which can specify datetime within `$(datetime_format)`, and the datetime format accepted by php [date()](http://php.net/manual/en/function.date.php) function.
- **$level**: An integer type defined by Monolog log level, default is `100` which means `DEBUG`.
- **$bubble**: Whether the messages that are handled can bubble up the stack or not, default is `true`.
- **$filePermission**: Optional file permissions (default (0644) are only for owner read/write).
- **$useLocking**: Try to lock log file before doing any writes, default is `false`.

Examples
========

[](#examples)

```
use Monolog\Logger;
use Yaxin\TimefileHandler\TimefileHandler;

$logger = new Logger('app');
$handler = new TimefileHandler('/tmp/app_%(Ymd_H).log', Logger::INFO);
$logger->pushHandler($handler);
$logger->warning('This is a message');
```

Then you can get the log message in `/tmp/app_.log` file.

License
=======

[](#license)

This tool is free software and is distributed under the MIT license. Please have a look at the LICENSE file for further information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Recently: every ~62 days

Total

6

Last Release

2141d ago

Major Versions

0.2.1 → 1.0.02020-06-28

PHP version history (4 changes)0.0.2PHP ^7.2

0.2.0PHP ^5.6

0.2.1PHP ^5.6|^7

1.0.0PHP ^7

### Community

Maintainers

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

---

Tags

loggerloggingmonologmonolog-handlermonolog-libraryphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yaxin-monolog-timefile-handler/health.svg)

```
[![Health](https://phpackages.com/badges/yaxin-monolog-timefile-handler/health.svg)](https://phpackages.com/packages/yaxin-monolog-timefile-handler)
```

###  Alternatives

[symfony/monolog-bridge

Provides integration for Monolog with various Symfony components

2.6k189.7M257](/packages/symfony-monolog-bridge)[rollbar/rollbar

Monitors errors and exceptions and reports them to Rollbar

33723.7M81](/packages/rollbar-rollbar)[illuminate/log

The Illuminate Log package.

6224.3M516](/packages/illuminate-log)[honeybadger-io/honeybadger-php

Honeybadger PHP library

381.5M4](/packages/honeybadger-io-honeybadger-php)[graycore/magento2-stdlogging

A Magento 2 module that changes all logging handlers to stdout

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

PHPackages © 2026

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