PHPackages                             marcj/change-logger-behavior - 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. marcj/change-logger-behavior

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

marcj/change-logger-behavior
============================

A behavior allowing you to log one or more columns in a extra logging table like the versionable behavior for Propel2.

332.6k1PHP

Since Jan 8Pushed 11y ago3 watchersCompare

[ Source](https://github.com/marcj/change-logger-behavior)[ Packagist](https://packagist.org/packages/marcj/change-logger-behavior)[ RSS](/packages/marcj-change-logger-behavior/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

### ChangeLoggerBehavior

[](#changeloggerbehavior)

A behavior for Propel2, like the VersionableBehavior, but column based. It logs basically all changes into a extra logger table, defined for each column you have specified in the `log` parameter.

Usage
-----

[](#usage)

```

```

If you haven't installed this behavior through composer, you need to specify the full class name as behavior name:

```

```

You can also define multiple columns. Each column gets a own logger table.

```

```

```
$user = UserQuery::create()->findByUsername('Klaus');
$user->setUsername('Erik');
$user->setUsernameChangeComment('Due to XY');
$user->setUsernameChangeBy('Superuser');
$user->save()

$usernameChangeLogs = UserUsernameLogQuery::create()
    ->filterByOrigin($user)
    ->orderByVersion('desc')
    ->find();

foreach ($usernameChangeLogs as $log) {
    echo $log->getVersion();
    echo $log->getId(); //foreignKey to `user`
    echo $log->getUsername(); //'Klaus'
    echo $log->getCreatedAt(); //timestamp
}
```

### Parameter

[](#parameter)

with its default value.

```

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/974147f78bc18a1b3838b2959678bab84bb15ce12b79ecb638c8444ff05bf3c3?d=identicon)[MArcJ](/maintainers/MArcJ)

---

Top Contributors

[![marcj](https://avatars.githubusercontent.com/u/450980?v=4)](https://github.com/marcj "marcj (6 commits)")

### Embed Badge

![Health badge](/badges/marcj-change-logger-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/marcj-change-logger-behavior/health.svg)](https://phpackages.com/packages/marcj-change-logger-behavior)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/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.2M138](/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)
