PHPackages                             urmaul/yii-formattedfilelogroute - 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. urmaul/yii-formattedfilelogroute

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

urmaul/yii-formattedfilelogroute
================================

This log route extends CFileLogRoute and gives you ability to specify log format.

v1.1.0(10y ago)0897MITPHP

Since Jul 7Pushed 10y agoCompare

[ Source](https://github.com/urmaul/formattedfilelogroute)[ Packagist](https://packagist.org/packages/urmaul/yii-formattedfilelogroute)[ Docs](https://github.com/urmaul/formattedfilelogroute)[ RSS](/packages/urmaul-yii-formattedfilelogroute/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Formatted FileLogRoute for Yii Framework
========================================

[](#formatted-filelogroute-for-yii-framework)

This log route extends [CFileLogRoute](http://www.yiiframework.com/doc/api/1.1/CFileLogRoute) and gives you ability to specify log format.

How to attach
-------------

[](#how-to-attach)

Add route config to log routes. It will look like this:

```
array(
	'class'      => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'     => "{time}\t{ip}\t{msg}",
	'categories' => 'application',
	'logFile'    => 'formatted.log',
),
```

Log variables
-------------

[](#log-variables)

You can use these variables in your log format:

- {ip} - client ip
- {uri} - request URI
- {ref} - request referer
- {sref} - short request referer (domain name is removed if referer domain is current domain)
- {time} - current time
- {level} - log message level
- {category} - log message category
- {message} - full log message text
- {msg} - log message text without stack trace
- {trace} - stack trace

Suggested routes
----------------

[](#suggested-routes)

```
array(
	'class'   => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'  => "{time}\t{ip}\t{category}\t{uri}\t{message}",
	'except'  => 'exception.CHttpException.404',
	'levels'  => 'error',
	'logFile' => 'error.log',
),
array(
	'class'      => 'ext.formattedfilelogroute.FormattedFileLogRoute',
	'format'     => "{time}\t{ip}\t{uri}\t{sref}",
	'categories' => 'exception.CHttpException.404',
	'logFile'    => 'error404.log',
),
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community2

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

Total

2

Last Release

3775d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22364b943477de78bf89bb19b5708a93666e38b5f1ad954ded9c656b3c116cb8?d=identicon)[urmaul](/maintainers/urmaul)

---

Tags

logfileyiiroute

### Embed Badge

![Health badge](/badges/urmaul-yii-formattedfilelogroute/health.svg)

```
[![Health](https://phpackages.com/badges/urmaul-yii-formattedfilelogroute/health.svg)](https://phpackages.com/packages/urmaul-yii-formattedfilelogroute)
```

###  Alternatives

[putyourlightson/craft-log-to-file

Logs messages to a specific log file for Craft CMS.

29368.0k5](/packages/putyourlightson-craft-log-to-file)

PHPackages © 2026

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