Scale back sentry logs for trivial events (#2997)

* scale back sentry logs

* update migrate log tests
This commit is contained in:
Hailey 2024-02-26 20:19:06 -08:00 committed by GitHub
parent 1a34921661
commit c8582924e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 24 deletions

View file

@ -121,7 +121,7 @@ export function transform(legacy: Partial<LegacySchema>): Schema {
* local storage AND old storage exists.
*/
export async function migrate() {
logger.info('persisted state: check need to migrate')
logger.debug('persisted state: check need to migrate')
try {
const rawLegacyData = await AsyncStorage.getItem(
@ -131,7 +131,7 @@ export async function migrate() {
const alreadyMigrated = Boolean(newData)
if (!alreadyMigrated && rawLegacyData) {
logger.info('persisted state: migrating legacy storage')
logger.debug('persisted state: migrating legacy storage')
const legacyData = JSON.parse(rawLegacyData)
const newData = transform(legacyData)
@ -139,14 +139,14 @@ export async function migrate() {
if (validate.success) {
await write(newData)
logger.info('persisted state: migrated legacy storage')
logger.debug('persisted state: migrated legacy storage')
} else {
logger.error('persisted state: legacy data failed validation', {
message: validate.error,
})
}
} else {
logger.info('persisted state: no migration needed')
logger.debug('persisted state: no migration needed')
}
} catch (e: any) {
logger.error(e, {