fix: structure logged data
This commit is contained in:
@@ -132,11 +132,13 @@ export const languageSwitcherQueryRouter = router({
|
||||
return { lang: ctx.lang, urls: baseUrls }
|
||||
}
|
||||
console.info(
|
||||
"contentstack.languageSwitcher start ",
|
||||
"contentstack.languageSwitcher start",
|
||||
JSON.stringify({
|
||||
uid: ctx.uid,
|
||||
lang: ctx.lang,
|
||||
contentType: ctx.contentType,
|
||||
query: {
|
||||
uid: ctx.uid,
|
||||
lang: ctx.lang,
|
||||
contentType: ctx.contentType,
|
||||
},
|
||||
})
|
||||
)
|
||||
const res = await getLanguageSwitcher({
|
||||
@@ -164,11 +166,27 @@ export const languageSwitcherQueryRouter = router({
|
||||
if (!validatedLanguageSwitcherData.success) {
|
||||
console.error(
|
||||
"contentstack.languageSwitcher validation error",
|
||||
JSON.stringify(validatedLanguageSwitcherData.error)
|
||||
JSON.stringify({
|
||||
query: {
|
||||
uid: ctx.uid,
|
||||
lang: ctx.lang,
|
||||
contentType: ctx.contentType,
|
||||
},
|
||||
error: validatedLanguageSwitcherData.error,
|
||||
})
|
||||
)
|
||||
return null
|
||||
}
|
||||
console.info("contentstack.languageSwitcher success")
|
||||
console.info(
|
||||
"contentstack.languageSwitcher success",
|
||||
JSON.stringify({
|
||||
query: {
|
||||
uid: ctx.uid,
|
||||
lang: ctx.lang,
|
||||
contentType: ctx.contentType,
|
||||
},
|
||||
})
|
||||
)
|
||||
return {
|
||||
lang: ctx.lang,
|
||||
urls,
|
||||
|
||||
Reference in New Issue
Block a user