improve line limit and add config for it

This commit is contained in:
Joey Kimsey
2024-08-10 14:58:57 -04:00
parent c81d20f018
commit 1513d6256e
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -48,6 +48,9 @@ if ( ! defined( 'CANARY_SHOW_LINES' ) ) {
if ( ! defined('CANARY_DEBUG_TO_CONSOLE' ) ) {
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.
if ( ! defined('CANARY_CONSTANTS_LOADED' ) ) {