This update introduces a critical bug fix where Console logging was enabled in web environments

This commit is contained in:
netkas 2024-10-29 14:18:30 -04:00
parent 73c333e6e6
commit a4b92d5191
3 changed files with 12 additions and 1 deletions

View file

@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [2.0.1] - 2024-10-29
This update introduces a critical bug fix where Console logging was enabled in web environments
## [2.0.0] - 2024-10-29 ## [2.0.0] - 2024-10-29
This update introduces some additional features & bug fixes This update introduces some additional features & bug fixes

View file

@ -20,7 +20,7 @@
"package": "net.nosial.loglib", "package": "net.nosial.loglib",
"company": "Nosial", "company": "Nosial",
"copyright": "Copyright (c) 2022-2023 Nosial", "copyright": "Copyright (c) 2022-2023 Nosial",
"version": "2.0.0", "version": "2.0.1",
"uuid": "de1deca6-7b65-11ed-a8b0-a172264634d8" "uuid": "de1deca6-7b65-11ed-a8b0-a172264634d8"
}, },
"build": { "build": {

View file

@ -24,6 +24,12 @@ class ConsoleLogging implements LogHandlerInterface
*/ */
public static function handle(Application $application, Event $event): void public static function handle(Application $application, Event $event): void
{ {
// Check if the application is running in a CLI environment, if not, return
if(!Utilities::runningInCli())
{
return;
}
// Check if the event level is enabled for console logging // Check if the event level is enabled for console logging
if(!Validate::checkLevelType($event->getLevel(), $application->getConsoleLoggingLevel())) if(!Validate::checkLevelType($event->getLevel(), $application->getConsoleLoggingLevel()))
{ {