Skip to content

Commit

Permalink
调整:debug导出
Browse files Browse the repository at this point in the history
  • Loading branch information
dxkite committed May 15, 2019
1 parent fe45cac commit 4c1ee6a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion suda/src/application/database/DebugObserver.php
Expand Up @@ -62,7 +62,12 @@ public function observe(StatementQueryAccess $access, Connection $connection, St
} else {
$value = $item->getValue();
}
$this->debug->debug(sprintf("query value :%s = %s", $item->getName(), json_encode($value)));
if (is_string($value) && strlen($value) > 256) {
$show = '<size:'.strlen($value).'>'.json_encode(substr($value, 0, 255)).'...';
} else {
$show = json_encode($value);
}
$this->debug->debug(sprintf("query value :%s = %s", $item->getName(), $show));
}
}
}

0 comments on commit 4c1ee6a

Please sign in to comment.