use console.error when applicable

This commit is contained in:
Josh Harvey 2016-11-18 18:43:54 +02:00
parent e008eb93bc
commit 0aa457680c
5 changed files with 6 additions and 6 deletions

View file

@ -8,8 +8,8 @@ const label = process.argv[2]
const masterSeedHex = process.argv[3].trim() const masterSeedHex = process.argv[3].trim()
if (process.argv.length !== 4) { if (process.argv.length !== 4) {
console.log('hdkf <label> <masterKey>') console.error('hdkf <label> <masterKey>')
console.log('masterKey should be in hex encoding.') console.error('masterKey should be in hex encoding.')
process.exit(3) process.exit(3)
} }

View file

@ -9,7 +9,7 @@ const set = migrate.load(migrateConfig, migrateDir)
set.up(err => { set.up(err => {
if (err) { if (err) {
console.log('DB Migration failed: %s', err) console.error('DB Migration failed: %s', err)
process.exit(1) process.exit(1)
} }

View file

@ -39,7 +39,7 @@ db.many('select data from user_config', 'exchanges')
process.exit(0) process.exit(0)
}) })
.catch(err => { .catch(err => {
console.log('Error: %s', err) console.error('Error: %s', err)
process.exit(1) process.exit(1)
}) })
}) })

View file

@ -60,7 +60,7 @@ function run () {
}) })
}) })
.catch(err => { .catch(err => {
console.log(err) console.error(err)
process.exit(1) process.exit(1)
}) })
} }

View file

@ -12,7 +12,7 @@ try {
const globalConfigPath = path.resolve('/etc', 'lamassu', 'lamassu.json') const globalConfigPath = path.resolve('/etc', 'lamassu', 'lamassu.json')
serverConfig = JSON.parse(fs.readFileSync(globalConfigPath)) serverConfig = JSON.parse(fs.readFileSync(globalConfigPath))
} catch (_) { } catch (_) {
console.log("Couldn't open config file.") console.error("Couldn't open lamassu.json config file.")
process.exit(1) process.exit(1)
} }
} }