Show additional data in debug log header
This commit is contained in:
parent
03874a788f
commit
689542a9b4
14 changed files with 278 additions and 89 deletions
10
ts/logging/formatCountForLogging.ts
Normal file
10
ts/logging/formatCountForLogging.ts
Normal 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))}`;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue