Version 5.0.0 beta 7

This commit is contained in:
Neo committed 2025-12-19 17:18:38 -08:00
1 parent fa2a720105
commit 54d5dcd0a0
156 files changed
+4337 -2995

No files matched your search

+29 -2
View File
@@ -24,6 +24,9 @@ use function get_called_class;
use function get_class;
use function is_array;
use function str_replace;
use function strrpos;
use function substr;
use function trim;
use function ucwords;
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
@@ -350,10 +353,34 @@ class Log extends ActiveRecord
{
if( !empty( Settings::i()->debug_log_events ) )
{
/* This setting would have URLs or URL fragments that we should check */
/* This setting would listener classes and event names that we should check */
foreach( json_decode( Settings::i()->debug_log_events, true ) as $string )
{
$stringToCheck = '[event] => ' . $string;
$bits = explode( ":", $string );
/* Are we debugging this listener type? */
preg_match( '/\[listener] => (.+?)[\n\r]/is', $message, $match );
if( isset( $match[1] ) )
{
try
{
if( class_exists( $match[1] ) )
{
$parentClass = get_parent_class( $match[1] );
if( substr( $parentClass, strrpos( $parentClass, '\\' ) + 1 ) != $bits[0] )
{
continue;
}
}
}
catch( Exception )
{
continue;
}
}
/* Check if we are debugging this method */
$stringToCheck = '[event] => ' . trim( $bits[1] );
if( strpos( $message, $stringToCheck ) !== false )
{
return static::log( $message, $category );