summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2017-10-21 17:16:55 +0300
committerYuval Adam <_@yuv.al>2017-10-21 17:16:55 +0300
commitab998ad8580cb6b96e39d26ac77acc36cd604385 (patch)
tree1b80c966a13995e276ddf1e1de9d55d6a9e3dd2e
parentf89b88d28b0f6a9284ac814a79eeb96943992d0e (diff)
Debug and not log
-rw-r--r--server.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/server.js b/server.js
index b3fe747..6d2b33c 100644
--- a/server.js
+++ b/server.js
@@ -9,7 +9,7 @@ const aws = require('aws-sdk')
const s3 = new aws.S3()
function fetchImages() {
- console.log('Running fetchImages()')
+ console.debug('Running fetchImages()')
request('http://map.govmap.gov.il/rainradar/radar.json', (error, response, body) => {
if (error) {
console.log(error)
@@ -24,7 +24,7 @@ function fetchImages() {
const key = `fetched:${url}`
client.get(key, (err, reply) => {
if (!reply && reply != 'fetching') {
- console.log(`Fetching ${url}`)
+ console.debug(`Fetching ${url}`)
client.set(key, 'fetching')
request({ url: url, encoding: null }, (error, response, body) => {
if (err) {
@@ -56,7 +56,7 @@ function fetchImages() {
})
}
else {
- console.log(`No need to fetch ${url}`)
+ console.debug(`No need to fetch ${url}`)
}
})
})
@@ -80,7 +80,7 @@ app.use('/', function (req, res, next){
fetchImages()
}
else {
- console.log('Skipping fetch, waiting 60 seconds max')
+ console.debug('Skipping fetch, waiting 60 seconds max')
}
})
})