Skip to content
This repository was archived by the owner on Oct 4, 2022. It is now read-only.

Commit 38722f7

Browse files
author
Takeshi Kishi
committed
remove debug log
1 parent 584dc9b commit 38722f7

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

src/natureRemoApi.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import https from 'https';
22
import querystring from 'querystring';
33
import { IncomingMessage } from 'http';
4-
import { Logging } from 'homebridge';
54

65
import { Mutex } from './mutex';
76

@@ -77,14 +76,12 @@ export class NatureRemoApi {
7776

7877
constructor(
7978
private readonly accessToken: string,
80-
private readonly logger: Logging,
8179
) {}
8280

8381
async getAllAppliances(): Promise<Appliance[]> {
8482
const release = await this.mutex.acquire();
8583
try {
8684
if (this.applianceCache.appliances && (Date.now() - this.applianceCache.updated) < CACHE_THRESHOLD) {
87-
this.logger.debug('[NatureRemoApi] Using cached appliances');
8885
return this.applianceCache.appliances;
8986
}
9087
const url = `${API_URL}/1/appliances`;
@@ -100,7 +97,6 @@ export class NatureRemoApi {
10097
const release = await this.mutex.acquire();
10198
try {
10299
if (this.deviceCache.devices && (Date.now() - this.deviceCache.updated) < CACHE_THRESHOLD) {
103-
this.logger.debug('[NatureRemoApi] Using cached devices');
104100
return this.deviceCache.devices;
105101
}
106102
const url = `${API_URL}/1/devices`;
@@ -179,7 +175,6 @@ export class NatureRemoApi {
179175
},
180176
};
181177
https.get(url, options, (res) => {
182-
this.logger.debug('[NatureRemoApi] Recieved API server response');
183178
if (res.statusCode !== 200) {
184179
reject(new Error(this.getHttpErrorMessage(res)));
185180
} else {
@@ -210,7 +205,6 @@ export class NatureRemoApi {
210205
},
211206
};
212207
const req = https.request(url, options, (res) => {
213-
this.logger.debug('[NatureRemoApi] Send message request');
214208
if (res.statusCode !== 200) {
215209
reject(new Error(this.getHttpErrorMessage(res)));
216210
} else {

src/platform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class NatureRemoPlatform implements DynamicPlatformPlugin {
2727
public readonly api: API,
2828
) {
2929
this.logger.debug('accessToken ->', this.config.accessToken);
30-
this.natureRemoApi = new NatureRemoApi(this.config.accessToken as string, logger);
30+
this.natureRemoApi = new NatureRemoApi(this.config.accessToken as string);
3131
this.logger.debug('Finished initializing platform:', this.config.name);
3232

3333
this.api.on(APIEvent.DID_FINISH_LAUNCHING, () => {

0 commit comments

Comments
 (0)