Skip to content

Commit

Permalink
remove winston splat support (#207)
Browse files Browse the repository at this point in the history
* remove winston splat support - it is not needed
 and causing unexpected exception: winstonjs/logform#40
  • Loading branch information
Jussi Vatjus-Anttila authored Sep 3, 2018
1 parent 91aed69 commit 8f1623a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ DB.connect()
.then(() => {
function onError(error) {
if (error.code === 'EACCES' && port < 1024) {
console.error("You haven't access to open port below 1024"); // eslint-disable-line no-console
console.error("Please use admin rights if you wan't to use port %d!", port); // eslint-disable-line no-console
console.error('You haven not access to open port below 1024'); // eslint-disable-line no-console
console.error(`Please use admin rights if you wan't to use port ${port}!`); // eslint-disable-line no-console
} else if (error.code === 'EADDRINUSE') {
console.error(`Port ${port} is already in use`); // eslint-disable-line no-console
} else {
Expand Down
4 changes: 2 additions & 2 deletions app/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ const sslcertCrt = config.get('sslcertCrt');
function createServer(app) {
if (config.get('https')) {
if (!fs.existsSync(sslcertKey)) {
logger.error('ssl cert key is missing: %s', sslcertKey);
logger.error(`ssl cert key is missing: ${sslcertKey}`);
process.exit(1);
}
if (!fs.existsSync(sslcertCrt)) {
logger.error('ssl cert crt is missing: %s', sslcertCrt);
logger.error(`ssl cert crt is missing: ${sslcertCrt}`);
process.exit(1);
}
const key = fs.readFileSync(sslcertKey);
Expand Down
5 changes: 2 additions & 3 deletions app/tools/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class MasterLogger {
format: format.combine(
format.colorize(),
format.timestamp(),
format.splat(),
format.printf(info => `${info.timestamp} ${info.level}: ${info.message}`)
)
};
Expand Down Expand Up @@ -76,8 +75,8 @@ class MasterLogger {
try {
this.logger.log(level, ...args);
} catch (error) {
this.logger.error(data);
this.logger.error(error);
console.error(error); // eslint-disable-line no-console
console.error(data); // eslint-disable-line no-console
}
}
log(level, ...args) {
Expand Down

0 comments on commit 8f1623a

Please sign in to comment.