Skip to content

Commit

Permalink
db/json: change log prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
comjun04 committed Nov 13, 2019
1 parent e61c691 commit ef47424
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions db/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ module.exports = class JSONProvider extends SettingProvider {
console.log('DB/JSON: init...');

if (!this.file.endsWith('.json')) {
console.error('DB/JSON: Not a vaild file!');
console.error('[DB/JSON] Not a vaild file!');
process.exit(1);
}
if (!fs.existsSync(this.file)) {
console.error('DB/JSON: File not exist!');
console.error('[DB/JSON] File not exist!');

fs.writeFileSync(this.file, "{}");
console.log('DB/JSON: Created Database file in ' + this.file);
console.log('[DB/JSON] Created Database file in ' + this.file);
}

obj = require('../' + this.file);
console.log('DB/JSON: Database read success');
console.log('[DB/JSON] Database read success');

/*
Expand Down

0 comments on commit ef47424

Please sign in to comment.