yomafleet / event-logger
Log in YF's preference format
v1.1.5
2024-01-16 04:29 UTC
Requires
- php: ^7.3|^8.0
- illuminate/support: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
- dev-master
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1.0
- v0.2.1
- v0.2.0
- v0.1.1
- v0.1.0
- dev-dependabot/github_actions/dot-github/workflows/shivammathur/setup-php-2.37.1
- dev-fix/asyn-logging
- dev-dev-master
- dev-feature/supported-laravel-version-upgrade
- dev-feature/dispatchable
- dev-feature/loki
- dev-feature/triggerer-phone-support
- dev-fix/setup
This package is not auto-updated.
Last update: 2026-05-26 05:43:03 UTC
README
Event logging with yomafleet's prefer format. Use monolog package underlying.
Installtion
composer require yomafleet/event-logger
Parameters
| name | type | description |
|---|---|---|
| $level | String | Log level as in RFC 5424 |
| $message | String | Short and descriptive message |
| $data | Array | Payload array with required keys. |
| $data['event'] | String | Name of the event separated by dot. For example, user.updated |
| $data['data'] | Array | Arbitrary data to log. |
| $data['trigger_by'] | Array | The trigger of the given event. If not provided, this app will try to guess from authenticated user first, then as a system user. |
| $data['type] | String | Type of the $data['data'], for example, user. If not provided, the first segement of $data['event'] will be added. |
Usage
<?php namespace App; use Yomafleet\EventLogger\EventLoggerFacade as EventLogger; class Example { public function example() { //... //... //... EventLogger::log( 'info', 'example', $data ); } }