Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing excessive log messages issue #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function LaserEggAccessory(log, config) {

LaserEggAccessory.prototype = {
servicePolling: function() {
this.log.info('Laser Egg Polling...');
this.log.debug('Laser Egg Polling...');
this.getObservation(
function(p) {
var that = this;
Expand Down Expand Up @@ -97,7 +97,7 @@ LaserEggAccessory.prototype = {
},
function(err, response, jsonObject) {
if (!err && response.statusCode === 200 && String(jsonObject.id) === String(that.laser_egg_id)){
that.log.info("Laser Egg PM2.5: %d, PM10: %d", jsonObject["info.aqi"]["data"]["pm25"], jsonObject["info.aqi"]["data"]["pm10"]);
that.log.debug("Laser Egg PM2.5: %d, PM10: %d", jsonObject["info.aqi"]["data"]["pm25"], jsonObject["info.aqi"]["data"]["pm10"]);
that.airQualityService.setCharacteristic(Characteristic.StatusFault,0);
if (jsonObject["info.aqi"]["data"].hasOwnProperty('pm25')) {
that.airQualityService.setCharacteristic(Characteristic.PM2_5Density, jsonObject["info.aqi"]["data"]["pm25"]);
Expand All @@ -114,7 +114,7 @@ LaserEggAccessory.prototype = {
);
}
var aqi = that.calcAQI(pm2_5);
that.log.info('Laser Egg AQI: %d', aqi);
that.log.debug('Laser Egg AQI: %d', aqi);
callback(that.trans_aqi(aqi));
}
);
Expand Down