Skip to content

Commit 3536fc1

Browse files
author
Soichi Hayashi
committed
removed more winston/logger reference
1 parent a3747d5 commit 3536fc1

File tree

4 files changed

+4
-12
lines changed

4 files changed

+4
-12
lines changed

api/health.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11

22
const redis = require('redis');
3-
const winston = require('winston');
43

54
const config = require('../config');
6-
const logger = winston.createLogger(config.logger.winston);
75
const db = require('./models');
86
const common = require('./common');
97

@@ -12,13 +10,12 @@ const pkg = require('./package.json');
1210
var redis_client = redis.createClient(config.redis.port, config.redis.server);
1311
redis_client.on('error', err=>{throw err});
1412
redis_client.on('ready', ()=>{
15-
logger.info("connected to redis");
13+
console.info("connected to redis");
1614
exports.health_check();
1715
setInterval(exports.health_check, 1000*60); //post health status every minutes
1816
});
1917

2018
exports.health_check = function() {
21-
//logger.debug("running api health check");
2219
var ssh = common.report_ssh();
2320
var report = {
2421
status: "ok",
@@ -57,15 +54,15 @@ exports.health_check = function() {
5754
report.messages.push('no instance from db');
5855
}
5956

60-
if(report.status != "ok") logger.error(report);
57+
if(report.status != "ok") console.error(report);
6158

6259
//report to redis
6360
redis_client.set("health.amaretti.api."+process.env.HOSTNAME+"-"+process.pid, JSON.stringify(report));
6461
});
6562
//});
6663
} catch(err) {
67-
logger.error("caught exception - probably from ssh_agent issue");
68-
logger.error(err);
64+
console.error("caught exception - probably from ssh_agent issue");
65+
console.error(err);
6966
}
7067
}
7168

api/service.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
//contrib
4-
const winston = require('winston');
53
const async = require('async');
64
const request = require('request'); //deprecate
75
const axios = require('axios');

api/transfer.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
'use strict';
22

3-
//contrib
4-
const winston = require('winston');
53
const async = require('async');
64
const sshpk = require('sshpk');
75
const ConnectionQueuer = require('ssh2-multiplexer');

api/wf.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/node
22
'use strict';
33

4-
//var winston = require('winston');
54
var server = require('./server');
65
server.start(function(err) {
76
if(err) throw err;

0 commit comments

Comments
 (0)