MCPcopy Create free account
hub / github.com/error311/FileRise / truncateLogMessage

Method truncateLogMessage

src/FileRise/Domain/UploadModel.php:1788–1794  ·  view source on GitHub ↗

* Truncate ClamAV output message for log safety. */

(string $msg, int $max)

Source from the content-addressed store, hash-verified

1786 * Truncate ClamAV output message for log safety.
1787 */
1788 private static function truncateLogMessage(string $msg, int $max): string
1789 {
1790 if (mb_strlen($msg, 'UTF-8') <= $max) {
1791 return $msg;
1792 }
1793 return mb_substr($msg, 0, $max, 'UTF-8') . '…';
1794 }
1795}

Callers 1

logVirusDetectionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected