Download the PHP package gokhankurtulus/logger without Composer
On this page you can find all versions of the php package gokhankurtulus/logger. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gokhankurtulus/logger
More information about gokhankurtulus/logger
Files in gokhankurtulus/logger
Package logger
Short Description A simple PHP library for logging.
License MIT
Informations about the package logger
Logger
A simple PHP library for logging.
Installation
You can install the library using Composer. Run the following command:
Usage
- Inheritance
- Securing the Logs
Logs/app.log output:
Inheritance
You can inherit from Logger class if you want to categorize your logs.
You must override the $folderPath
and $fileName
parameters for conflicts.
Logs/app.log output:
DBLogs/pdo.log output:
Public Methods
Securing the Logs
Log files may contain sensitive information such as database, credentials or other confidential data. It is important to secure the files and restrict access to prevent unauthorized exposure of this information. The security of your logs is your responsibility. However, please attention to the following steps;
- Place the log folder outside the public web directory or in directory that is not directly accessible by the web server.
- Set file permissions to ensure that only authorized users or processes can read the log files.
- Add the log folder to your project's
.gitignore
file. This ensures that the file is not included in version control systems, preventing accidental exposure of sensitive information in your code repository.
License
Logger is open-source software released under the MIT License. Feel free to modify and use it in your projects.
Contributions
Contributions to Logger are welcome! If you find any issues or have suggestions for improvements, please create an issue or submit a pull request on the GitHub repository.