Skip to content

Commit

Permalink
temporarily disable logging of config, see #253
Browse files Browse the repository at this point in the history
  • Loading branch information
sroertgen committed Feb 13, 2023
1 parent 34f596a commit 8f5d7c7
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ const parseLanguages = (json) => {
* @param {string} defaultFile
* @returns {object} config
*/

const loadConfig = (configFile, defaultFile) => {
let userConfig
const defaults = yaml.load(fs.readFileSync(defaultFile, "utf8"))
Expand All @@ -254,7 +253,8 @@ const loadConfig = (configFile, defaultFile) => {
userConfig = yaml.load(fs.readFileSync(configFile, "utf8"))
} catch (e) {
// eslint-disable-next-line no-console
console.log("no user config provided, using default config")
// TODO when #253 is further investigated this might be turned on again
// console.log("no user config provided, using default config")
userConfig = defaults
}

Expand Down Expand Up @@ -294,7 +294,7 @@ const loadConfig = (configFile, defaultFile) => {
return true
} else {
// eslint-disable-next-line no-console
console.log("some needed colors are not defined, using default colors")
// console.log("some needed colors are not defined, using default colors")
return false
}
}
Expand All @@ -308,9 +308,9 @@ const loadConfig = (configFile, defaultFile) => {
return true
} else {
// eslint-disable-next-line no-console
console.log(
"Some necessary font props were not given, using default fonts"
)
// console.log(
// "Some necessary font props were not given, using default fonts"
// )
return false
}
}
Expand All @@ -322,15 +322,6 @@ const loadConfig = (configFile, defaultFile) => {
if (!checkFonts()) {
config.fonts = defaults.ui.fonts
}

// eslint-disable-next-line no-console
console.log(`Starting up with config:
title: ${config.title}
logo: ${config.logo}
tokenizer: ${config.tokenizer},
colors: ${JSON.stringify(config.colors, null, 2)}
fonts: ${JSON.stringify(config.fonts, null, 2)}
`)
return config
}

Expand Down

0 comments on commit 8f5d7c7

Please sign in to comment.