@@ -391,7 +391,7 @@ public function setCaptureErrorCookiesBlacklist($rawConfig = null)
391391 public function setDebugLogPath ($ path )
392392 {
393393 if ($ path == null ) {
394- $ this ->log ('[DebugLogPath] is not valid. ' );
394+ $ this ->logError ('[DebugLogPath] is not valid. ' );
395395 return ;
396396 }
397397
@@ -636,8 +636,12 @@ protected function logDebug($message)
636636 *
637637 * @return void
638638 */
639- protected function log ($ message , $ args , $ success = true )
639+ protected function log ($ message , $ args = null , $ success = true )
640640 {
641+ if ($ args == null ) {
642+ $ args = array ();
643+ }
644+
641645 $ replacements = array_slice ($ args , 1 );
642646 $ prefix = $ success ? 'Stackify Log ' : 'Stackify Error ' ;
643647 $ template = "[ $ prefix][Config] $ message " ;
@@ -661,7 +665,7 @@ protected function log($message, $args, $success = true)
661665 public function extract ($ config = null )
662666 {
663667 if (is_array ($ config ) == false ) {
664- $ this ->log ('[ ' . __CLASS__ .'][ ' . __FUNCTION__ .'] $config is not an array. ' );
668+ $ this ->logDebug ('[ ' . __CLASS__ .'][ ' . __FUNCTION__ .'] $config is not an array. ' );
665669 return ;
666670 }
667671
@@ -674,7 +678,7 @@ public function extract($config = null)
674678 continue ;
675679 }
676680
677- $ this ->log ('[ ' . __CLASS__ .'][ ' . __FUNCTION__ .'] ' . $ method .' does not exists. ' );
681+ $ this ->logDebug ('[ ' . __CLASS__ .'][ ' . __FUNCTION__ .'] ' . $ method .' does not exists. ' );
678682 }
679683 }
680684 }
@@ -716,7 +720,7 @@ protected function parseStringToArray($string = null, $property = null)
716720 protected function getBoolean ($ enable = null , $ property = null )
717721 {
718722 if (is_bool ($ enable ) == false ) {
719- $ this ->log ('[ ' .$ property .'] is not a boolean. ' );
723+ $ this ->logError ('[ ' .$ property .'] is not a boolean. ' );
720724 return null ;
721725 }
722726
0 commit comments