Show additional data in debug log header

This commit is contained in:
Evan Hahn
2021-07-30 11:43:16 -05:00
committed by GitHub
parent 03874a788f
commit 689542a9b4
14 changed files with 278 additions and 89 deletions

View File

@@ -0,0 +1,10 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
export const formatCountForLogging = (count: number): string => {
if (count === 0 || Number.isNaN(count)) {
return String(count);
}
return `at least ${10 ** Math.floor(Math.log10(count))}`;
};