2 Commits
1.0.3 ... 1.0.4

Author SHA1 Message Date
7ce988fbd9 improve line limit and add config for it 2024-08-10 14:58:57 -04:00
c81d20f018 bugfix 2024-08-10 14:15:17 -04:00
2 changed files with 5 additions and 2 deletions

View File

@ -226,8 +226,8 @@ class Canary {
if ( ! CANARY_ENABLED ) { if ( ! CANARY_ENABLED ) {
return; return;
} }
if ( strlen( self::$debugLog ) > 50000 ) { if ( strlen( self::$debugLog ) > CANARY_DEBUG_LOG_LIMIT ) {
self::$tempusDebugger->log( 'Error log too large, possible loop.' ); self::$tempusLogger->addLog( 'log', 'Error log too large, possible loop.' );
return; return;
} }
if ( is_object( $data ) ) { if ( is_object( $data ) ) {

View File

@ -48,6 +48,9 @@ if ( ! defined( 'CANARY_SHOW_LINES' ) ) {
if ( ! defined('CANARY_DEBUG_TO_CONSOLE' ) ) { if ( ! defined('CANARY_DEBUG_TO_CONSOLE' ) ) {
define( 'CANARY_DEBUG_TO_CONSOLE', false ); define( 'CANARY_DEBUG_TO_CONSOLE', false );
} }
if ( ! defined('CANARY_DEBUG_LOG_LIMIT' ) ) {
define( 'CANARY_DEBUG_LOG_LIMIT', 500000 );
}
# Tell the app all constants have been loaded. # Tell the app all constants have been loaded.
if ( ! defined('CANARY_CONSTANTS_LOADED' ) ) { if ( ! defined('CANARY_CONSTANTS_LOADED' ) ) {