Skip to content

Commit

Permalink
comment out/disable console.log statements
Browse files Browse the repository at this point in the history
  • Loading branch information
tinuola committed Oct 16, 2024
1 parent 49336d9 commit 35e2feb
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions composables/useHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const useHeader = () => {
const header = useState('header', () => {})

const setHeader = (store) => {
console.log('set header', import.meta.server)
console.log('setHeader', store, header.value || 'None!')
// console.log('set header', import.meta.server)
// console.log('setHeader', store, header.value || 'None!')
if (!header.value) {
header.value = store.header
}
Expand Down
2 changes: 1 addition & 1 deletion modules/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default defineNuxtModule({
})
const body = await response.text()
const testJson = JSON.parse(body)
console.log('Index created:' + JSON.stringify(testJson))
// console.log('Index created:' + JSON.stringify(testJson))
console.log('Elastic Search index created succesfully!')
} catch (err) {
console.error('Error:', err)
Expand Down
2 changes: 1 addition & 1 deletion pages/collections/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (!data.value.ftvaCollection) {
const page = ref(_get(data.value, 'ftvaCollection', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaCollection', {})
})
Expand Down
2 changes: 1 addition & 1 deletion pages/events/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const page = ref(_get(data.value, 'ftvaEvent', {}))
const series = ref(_get(data.value, 'ftvaEventSeries', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaEvent', {})
series.value = _get(newVal, 'ftvaEventSeries', {})
})
Expand Down
2 changes: 1 addition & 1 deletion pages/series/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const otherSeriesOngoing = ref(_get(data.value, 'otherSeriesOngoing', {}))
const otherSeriesUpcoming = ref(_get(data.value, 'otherSeriesUpcoming', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaEventSeries', {})
upcomingEvents.value = _get(newVal, 'upcomingEvents', {})
pastEvents.value = _get(newVal, 'pastEvents', {})
Expand Down
2 changes: 1 addition & 1 deletion plugins/craft-layout-data.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineNuxtPlugin((nuxtApp) => { //
]
}

console.log('globalStore.footerPrimary', JSON.stringify(globalStore.footerPrimary))
// console.log('globalStore.footerPrimary', JSON.stringify(globalStore.footerPrimary))
}
}
return {
Expand Down
8 changes: 4 additions & 4 deletions plugins/data-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ async function keywordSearchWithFilters(
config.public.esAlias === ''
)
return
console.log('keyword:' + keyword)
console.log('filters:' + filters)
console.log('sort:' + sort)
// console.log('keyword:' + keyword)
// console.log('filters:' + filters)
// console.log('sort:' + sort)

const testquery = JSON.stringify({
_source: [...source],
Expand All @@ -100,7 +100,7 @@ async function keywordSearchWithFilters(
...parseFieldNames(aggFields),
},
})
console.log('this is the query: ' + testquery)
// console.log('this is the query: ' + testquery)

const response = await fetch(
`${config.public.esURL}/${config.public.esAlias}/_search`, // replace alias with indexname
Expand Down
8 changes: 4 additions & 4 deletions plugins/indexer.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export default defineNuxtPlugin((nuxtApp) => {
// console.log('Existing data in ES', docExistsResponseValue)

if (docExistsResponseValue && docExistsResponseValue._source) {
console.log('GET-RESPONSE: ' + slug)
// console.log('GET-RESPONSE: ' + slug)
const updateUrl = `${esURL}/${esIndex}/_update/${slug}`
console.log('ES update url', updateUrl)
// console.log('ES update url', updateUrl)
const postBody = {
doc: data
}
console.log('postBody', JSON.stringify(postBody))
// console.log('postBody', JSON.stringify(postBody))
const updateResponse = await fetch(
`${esURL}/${esIndex}/_update/${slug}`,
{
Expand Down Expand Up @@ -61,7 +61,7 @@ export default defineNuxtPlugin((nuxtApp) => {
}
)

console.log('Create a new document in ES:', await response.text())
// console.log('Create a new document in ES:', await response.text())
}
} else {
console.warn('not indexing anything')
Expand Down
2 changes: 1 addition & 1 deletion utils/arrayOfArrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function arrayOfArrays(arr, chunkSize) {
const group = []
for (let i = 0; i < arr.length; i += chunkSize) {
const chunk = arr.slice(i, i + chunkSize)
console.log('Chunk' + i + chunk)
// console.log('Chunk' + i + chunk)
group.push(chunk)
}
return group
Expand Down

0 comments on commit 35e2feb

Please sign in to comment.