Import log instead of using it off of window

This commit is contained in:
Josh Perez 2021-09-17 14:27:53 -04:00 committed by GitHub
parent 8eb0dd3116
commit 65ddf0a9e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 3654 additions and 3433 deletions

View file

@ -9,6 +9,7 @@ import { MessageModel } from '../models/messages';
import { ReadStatus } from '../messages/MessageReadStatus';
import { markViewed } from '../services/MessageUpdater';
import { isIncoming } from '../state/selectors/message';
import * as log from '../logging/log';
type ViewSyncAttributesType = {
senderId: string;
@ -43,7 +44,7 @@ export class ViewSyncs extends Collection {
);
});
if (syncs.length) {
window.log.info(
log.info(
`Found ${syncs.length} early view sync(s) for message ${message.get(
'sent_at'
)}`
@ -72,7 +73,7 @@ export class ViewSyncs extends Collection {
});
if (!found) {
window.log.info(
log.info(
'Nothing found for view sync',
sync.get('senderId'),
sync.get('senderE164'),
@ -92,7 +93,7 @@ export class ViewSyncs extends Collection {
this.remove(sync);
} catch (error) {
window.log.error(
log.error(
'ViewSyncs.onSync error:',
error && error.stack ? error.stack : error
);