PHPackages                             amattu2/event-logger - 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. amattu2/event-logger

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

amattu2/event-logger
====================

A lightweight, basic PHP 7+ event message logger that eases the workload of writing and generating timestamped events.

v1.0.0(3y ago)017AGPL-3.0PHP

Since Mar 9Pushed 3y ago1 watchersCompare

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

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

Introduction
============

[](#introduction)

This is a basic PHP event logger class for writing HTML based event logs.

Usage
=====

[](#usage)

### addEvent

[](#addevent)

This function is used to add a new event log. Optionally override the default timestamp (now).

```
/**
 * Add a new event to the log
 *
 * @param string $text event content
 * @param ?DateTime $timestamp event timestamp
 * @return boolean success
 * @author Alec M.
 */
public function addEvent(string $text, \DateTime $timestamp = null) : bool
```

### getStartTime

[](#getstarttime)

This function returns the exact DateTime for the timestamp of the first event added.

```
/**
 * Return first event timestamp
 *
 * @return \DateTime
 */
public function getStartTime() : \DateTime
```

### getEndTime

[](#getendtime)

This function returns the timestamp as a DateTime for the last time an event was added to the log.

```
/**
 * Return last event timestamp
 *
 * @return \DateTime
 */
public function getEndTime() : \DateTime
```

### getEvents

[](#getevents)

This returns the event log as an array.

```
/**
 * Return collection of events
 *
 * @return array
 */
public function getEvents() : array
```

### getEventsTable

[](#geteventstable)

This returns the event log formatted as an HTML table. Optionally override the DateTime format for events.

```
/**
  * Return the event list as a HTML table
  *
  * @param string $date_format DateTime format string
  * @return string HTML table
  */
public function getEventsTable(string $date_format = "Y-m-d G:i:s") : string
```

Requirements &amp; Dependencies
===============================

[](#requirements--dependencies)

PHP 7+ or above

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

1158d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/45d27ac587ba85712309c969ca2e277df1044c60ce9f2f8a5ca69118211e30d6?d=identicon)[amattu2](/maintainers/amattu2)

---

Top Contributors

[![amattu2](https://avatars.githubusercontent.com/u/38357871?v=4)](https://github.com/amattu2 "amattu2 (5 commits)")

### Embed Badge

![Health badge](/badges/amattu2-event-logger/health.svg)

```
[![Health](https://phpackages.com/badges/amattu2-event-logger/health.svg)](https://phpackages.com/packages/amattu2-event-logger)
```

###  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)
