Skip to content

Commit

Permalink
Remove verboseDebugLogging flag
Browse files Browse the repository at this point in the history
Instead, just do everything through the logging API

Signed-off-by: Marcel Robitaille <mail@marcelrobitaille.me>
  • Loading branch information
MarcelRobitaille committed Mar 18, 2023
1 parent 51f5bda commit 64c3295
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/components/RecipeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ export default {
},
watch: {
recipe(r) {
this.$log.debug('Recipe has been updated')
this.$log.debug("Recipe has been updated")
if (r) {
this.$log.debug("Recipe", r)
Expand Down
10 changes: 2 additions & 8 deletions src/components/SuggestionsPopup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,7 @@ export const suggestionsPopupMixin = {
* Recover suggestions popup on focus
*/
handleSuggestionsPopupFocus(e) {
if (this.verboseDebugLogging) {
// eslint-disable-next-line no-console
console.log("focus", e, JSON.stringify(this.suggestionsData))
}
this.$log.debug("focus", e, JSON.stringify(this.suggestionsData))
if (this.suggestionsData?.blurred) {
this.suggestionsData.blurred = false
}
Expand All @@ -223,10 +220,7 @@ export const suggestionsPopupMixin = {
* Cancel selection if input gets blurred
*/
handleSuggestionsPopupBlur(e) {
if (this.verboseDebugLogging) {
// eslint-disable-next-line no-console
console.log("blur", e, JSON.stringify(this.suggestionsData))
}
this.$log.debug("blur", e, JSON.stringify(this.suggestionsData))
if (!this.suggestionsPopupVisible || !this.$refs.suggestionsPopup) {
return
}
Expand Down
3 changes: 0 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ window.escapeHTML = helpers.escapeHTML
Vue.prototype.$window = window
Vue.prototype.OC = OC

// eslint-disable-next-line no-undef
Vue.prototype.verboseDebugLogging = verboseDebugLogging

// Markdown for Vue
Vue.use(VueShowdown, {
// set default flavor for Markdown
Expand Down
1 change: 0 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ function cookbookConfig (env) {
new CleanWebpackPlugin(),
new webpack.DefinePlugin({
'__webpack_use_dev_server__': env.dev_server || false,
'verboseDebugLogging': isDev && (process.env.VERBOSE || false),
}),
],
resolve: {
Expand Down

0 comments on commit 64c3295

Please sign in to comment.