arshinalbab / superlog
dev-main
2023-06-21 02:17 UTC
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-21 05:06:42 UTC
README
SuperLog is a PHP logging library that provides a simple way to log messages to a file.
Installation
Install SuperLog using Composer:
composer require arshinalbab/superlog
Usage
Create an instance of the SuperLog\Logger
class and use the log()
method to log messages:
<?php require_once 'vendor/autoload.php'; use SuperLog\Logger; $logger = new Logger(); $logger->log('This is a log message.');
By default, the log messages are written to a file named log.txt
in the current directory. You can specify a different file path in the constructor:
$logger = new Logger('path/to/log.txt');
Contributing
Contributions are welcome! If you find any issues or want to contribute to the project, please follow these steps:
- Fork the repository
- Create a new branch
- Make your changes
- Write tests for your changes
- Run the tests: vendor/bin/phpunit
- Commit your changes and push to your forked repository
- Submit a pull request
License
This project is licensed under the MIT License.