szabson/logs-cleanup-data

There is no license information available for the latest version (1.0.0) of this package.

Logs Cleanup Data Project

1.0.0 2023-10-23 12:25 UTC

This package is not auto-updated.

Last update: 2024-11-05 14:25:32 UTC


README

Logs Cleanup Data is a simple PHP package for managing and working with logs.

Installation

You can install this package via Composer. Run the following command to add it to your project:

composer require szabson/logs-cleanup-data:dev-master

Example Usage

In the usage example found in the RemoveLogsCommandTest, a logger factory FileLoggerFactory is created, which is used by RemoveLogsCommand to manage logs. The RemoveLogsCommand removes logs older than a specified number of days.

Requirements

The project is written in PHP and uses PHPUnit for testing. To run the project and tests, you need to have PHP version 8.2 and PHPUnit installed. The project has no external library dependencies.

Additional content

In addition to deleting logs, I've added some simple log management features that you'll find in FileLogger I implemented file log management. I took care of the possibility of future development with database logs.

Running Tests

 vendor/bin/phpunit tests

This will run all the tests and display the results in the console.

Author

This project was created by Daniel Chabowski