arshinalbab / superlog
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/arshinalbab/superlog
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2025-10-21 07:33:53 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.