Skip to content

Commit 038114f

Browse files
author
Alberto Iannaccone
committed
clean-up code
1 parent dac12aa commit 038114f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Diff for: arduino-ide-extension/src/node/monitor-settings/monitor-settings-provider-impl.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
longestPrefixMatch,
1414
reconcileSettings,
1515
} from './monitor-settings-utils';
16+
import { ILogger } from '@theia/core';
1617

1718
const MONITOR_SETTINGS_FILE = 'pluggable-monitor-settings.json';
1819

@@ -21,6 +22,9 @@ export class MonitorSettingsProviderImpl implements MonitorSettingsProvider {
2122
@inject(EnvVariablesServer)
2223
protected readonly envVariablesServer: EnvVariablesServer;
2324

25+
@inject(ILogger)
26+
protected logger: ILogger;
27+
2428
// deferred used to guarantee file operations are performed after the service is initialized
2529
protected ready = new Deferred<void>();
2630

@@ -43,8 +47,6 @@ export class MonitorSettingsProviderImpl implements MonitorSettingsProvider {
4347
// read existing settings
4448
await this.readSettingsFromFS();
4549

46-
console.log(this.monitorSettings);
47-
4850
// init is done, resolve the deferred and unblock any call that was waiting for it
4951
this.ready.resolve();
5052
}
@@ -105,7 +107,7 @@ export class MonitorSettingsProviderImpl implements MonitorSettingsProvider {
105107
try {
106108
this.monitorSettings = JSON.parse(rawJson);
107109
} catch (error) {
108-
console.error(
110+
this.logger.error(
109111
'Could not parse the pluggable monitor settings file. Using empty file.'
110112
);
111113
this.monitorSettings = {};

Diff for: arduino-ide-extension/src/test/node/monitor-settings-utils.test.ts

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import { PluggableMonitorSettings } from '../../node/monitor-settings/monitor-se
77

88
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
99

10-
// use(require('chai-string'));
11-
1210
describe('longestPrefixMatch', () => {
1311
const settings = {
1412
'arduino:avr:uno-port1-protocol1': {

0 commit comments

Comments
 (0)