Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

[C-1040] Remove extraneous mobile logs #2107

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/common/src/services/audius-backend/AudiusBackend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,6 @@ export const audiusBackend = ({
selectionRequestRetries: getRemoteVar(
IntKeys.DISCOVERY_NODE_SELECTION_REQUEST_RETRIES
),
unhealthySlotDiffPlays: getRemoteVar(
IntKeys.DISCOVERY_NODE_MAX_SLOT_DIFF_PLAYS
),
unhealthyBlockDiff: getRemoteVar(
IntKeys.DISCOVERY_NODE_MAX_BLOCK_DIFF
)
Expand Down Expand Up @@ -790,7 +787,6 @@ export const audiusBackend = ({

function getSolanaAudiusDataConfig() {
if (!anchorProgramId || !anchorAdminAccount) {
console.warn('Missing solana audius data config')
return {
error: true
}
Expand All @@ -813,7 +809,6 @@ export const audiusBackend = ({
!ethTokenBridgeAddress ||
!solTokenBridgeAddress
) {
console.warn('Missing wormhole configs')
return {
error: true
}
Expand Down
4 changes: 0 additions & 4 deletions packages/common/src/services/fingerprint/FingerprintClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ export class FingerprintClient<TFingerprintClient> {
}

async init() {
console.log('Initializing Fingerprint client')
try {
const fp = await this.initFingerprint(this.apiKey, this.endpoint)
console.log(`Fingerprint loaded`)
this.fingerprint = fp
} catch (e) {
console.error(`Error initializing fingerprint client: ${e}`)
Expand All @@ -74,7 +72,6 @@ export class FingerprintClient<TFingerprintClient> {
const { count } = await response.json()

if (count >= 1) {
console.log('Previously fingerprinted this user<>platform')
return
}

Expand All @@ -83,7 +80,6 @@ export class FingerprintClient<TFingerprintClient> {
linkedId: userId.toString(),
tag: { origin: clientOrigin }
})
console.log('Fingerprint identify')
} catch (e) {
console.error(`Error identifying fingerprint client: ${e}`)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/common/src/utils/timeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ export const formatSecondsAsText = (seconds: number): string => {
return `${d.minutes()}m ${d.seconds()}s`
}

export const formatDate = (date: MomentInput): string => {
return moment(date).format('MM/DD/YY')
export const formatDate = (date: MomentInput, format?: string): string => {
return moment(date, format).format('MM/DD/YY')
}

export const formatDateWithTimezoneOffset = (date: MomentInput): string => {
Expand Down
1 change: 1 addition & 0 deletions packages/mobile/src/components/card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ type CardImageProps = {
const CardImage = ({ id, type, imageSize }: CardImageProps) => {
const useImage =
type === 'user' ? useUserProfilePicture : useCollectionCoverArt

const image = useImage({
id,
sizes: imageSize,
Expand Down
1 change: 0 additions & 1 deletion packages/mobile/src/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ class PushNotifications {
}

async onRegister(token: Token) {
console.log('REGISTER DEVICE TOKEN', token)
this.token = token
await AsyncStorage.setItem('@device_token', JSON.stringify(token))
isRegistering = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,9 @@ export const TrackScreenDetailsTile = ({
{
isHidden: is_unlisted,
label: 'Released',
value: formatDate(release_date || created_at)
value: release_date
? formatDate(release_date, 'ddd MMM DD YYYY HH:mm:ss')
: formatDate(created_at, 'YYYY-MM-DD HH:mm:ss')
},
{
icon:
Expand Down
5 changes: 0 additions & 5 deletions packages/mobile/src/services/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ const ampInstance = Amplitude.getInstance()

export const init = async () => {
try {
console.info('Analytics setup')
if (AmplitudeWriteKey) {
await ampInstance.init(AmplitudeWriteKey)
analyticsSetupStatus = 'ready'
console.info('Analytics ready')
} else {
analyticsSetupStatus = 'error'
console.info('Analytics unable to setup: missing amplitude write key')
Expand Down Expand Up @@ -61,7 +59,6 @@ export const identify = async (
) => {
const isSetup = await isAudiusSetup()
if (!isSetup) return
console.info('Analytics identify', handle, traits)
ampInstance.setUserId(handle)
ampInstance.setUserProperties(traits)
}
Expand All @@ -76,7 +73,6 @@ export const track = async ({ eventName, properties }: Track) => {
...properties,
mobileClientVersion: version
}
console.info('Analytics track', eventName, propertiesWithContext)
ampInstance.logEvent(eventName, propertiesWithContext)
}

Expand All @@ -85,6 +81,5 @@ export const track = async ({ eventName, properties }: Track) => {
export const screen = async ({ route, properties = {} }: Screen) => {
const isSetup = await isAudiusSetup()
if (!isSetup) return
console.info('Analytics screen', route, properties)
ampInstance.logEvent(EventNames.PAGE_VIEW, { route, ...properties })
}
27 changes: 0 additions & 27 deletions packages/mobile/src/utils/logging.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/web/src/common/store/profile/sagas.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ function* fetchProfileCustomizedCollectibles(user) {
}
])
)
console.log('something went wrong, could not get user collectibles order')
}
}
}
Expand Down