diff --git a/library/think/log/driver/Trace.php b/library/think/log/driver/Trace.php index 6b160042..bd9c6ea4 100644 --- a/library/think/log/driver/Trace.php +++ b/library/think/log/driver/Trace.php @@ -41,7 +41,7 @@ class Trace */ public function save(array $log = []) { - if (IS_AJAX || IS_CLI || IS_API || 'html' != RESPONSE_TYPE) { + if (IS_AJAX || IS_CLI || IS_API || (defined('RESPONSE_TYPE') && 'html' != RESPONSE_TYPE)) { // ajax cli api方式下不输出 return false; }