- Added support for PHP 8.3
- Adjusted the
getClientIP()
function to be more effective. - Adjusted the
__construct
to allow for empty filenames.
- Added support for tsv files.
- Added error handling for illegal file extensions.
- Removed the inclusion of external libraries as they are not needed.
- Improved the
putLog()
function to handle data more efficiently, ensuring consistent log structure regardless of the logging flags. - Enhanced log rotation mechanism to accommodate varying log file names while ensuring that log history is maintained according to defined criteria.
-
Resolved an issue where the IP address was not being logged despite the flag being set.
-
Addressed an issue where the timestamp was being duplicated in log entries.
- Restructured the folders
- Implemented advanced IP address detection to account for proxies, load balancers, etc.
- Introduced log rotation mechanism to manage large log files.
- Logs are rotated weekly.
- Log naming convention includes week of the year and year.
- Maximum retention period for logs set to 3 months.
- Files exceeding 25MB are split with an incremental suffix.
- Added constants for easily configurable log rotation settings.
- Introduced a mechanism to define custom error messages via a
define
method.
- Replaced hardcoded error messages with references to a new
$errorMessages
property to allow for custom error definitions. - The Logger class's error handling mechanism was enhanced to utilize the custom error messages.
- Introduced advanced browser and OS detection using external libraries.
- Ability to define paths for external libraries (
Mobile_Detect
andBrowser.php
) directly from the constructor. - Provided error handling for cases where advanced detection fails, reverting to a basic method.
- The Logger class to be more flexible, allowing for the capture of IP addresses, browser details, and operating system information.
- Enhanced error handling and improved CSV column definition checks.
- Modified the Logger class to handle cases where CSV columns might not be provided.
- Updated the
putLog
method to handle both strings and arrays, enhancing flexibility.
- Updated the Markdown documentation to reflect new features and usage examples.
- Provided more explicit instructions for installation, especially regarding the inclusion of external libraries.
- Usage examples were expanded to cover both txt and csv logging scenarios.
- Conducted an in-depth code analysis to identify potential issues and rectified them.
- Resolved potential issues with
$insert
where it might not be an array when logging to a CSV. - Fixed the potential problem of
$this->csvColumns
being empty, allowing the class to handle such cases gracefully.