SuperLog is a PHP logging library that provides a simple way to log messages to a file.
Install SuperLog using Composer:
composer require arshinalbab/superlog
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');
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
This project is licensed under the MIT License.