Update Description for HTGLoggers 2.1.0.0 Version: 2.1.0.0
Release Date: 21.09.2024
What’s New:
API Initialization: Introduced a new initialize method in the HTGLoggersAPI class to allow other plugins to utilize logging features.
Log File Creation: Added the createLogFile method for automatic log file creation for specified plugins.
File Logging: Introduced a new logToFile method that allows logging messages to a log file in append mode.
Usage Examples: Included code examples for API initialization and logging messages to files in the documentation.
Fixes:
API Initialization Errors Improved the initialization mechanism to prevent conflicts and incorrect logging, especially with incompatible plugin versions.
Added additional validation during API initialization. HTGLoggersAPI now checks if it has already been initialized and throws an IllegalStateException in case of a reinitialization attempt. Instead of a warning logged in the console, improper reinitialization now results in an exception.
Handling Empty Plugin Names:
Fixed an issue where empty or null plugin names could be passed to the createLogFile method. The method now validates the pluginName parameter and logs an error if the name is invalid.
Added:
Enhanced Exception Handling:
Implemented detailed exception handling when creating log files. Any errors related to folder or file creation are now logged at the SEVERE level, including the full stack trace.
Expanded Parameter Validation:
Added validation for the plugin name in the createLogFile method. The method now checks if the plugin name is neither empty nor null before attempting to create a log file.
Removed:
Unnecessary API Reinitialization Warning:
Removed the logic that warned about API reinitialization and replaced it with an exception. This prevents potential errors in the future.