Skip to content

Commit

Permalink
Log info start/stop on info level
Browse files Browse the repository at this point in the history
  • Loading branch information
MyHomeMyData committed Dec 18, 2023
1 parent e19c00b commit 63fb99b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/canCollect.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class collect {
await this.storage.storeStatistics(ctx, this);
this.data.collecting = false;
await this.storage.setOpMode('normal');
await ctx.log.debug('Collect worker started on '+this.config.stateBase);
await ctx.log.info('Collect worker started on '+this.config.stateBase);
}

async stop(ctx) {
Expand All @@ -62,7 +62,7 @@ class collect {

// Stop worker:
this.data.collecting = false;
await ctx.log.debug('Collect worker stopped on '+this.config.stateBase);
await ctx.log.info('Collect worker stopped on '+this.config.stateBase);
} catch (e) {
// Do nothing
}
Expand Down
4 changes: 2 additions & 2 deletions lib/canUds.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class uds {
}
await this.setWorkerOpMode(opMode);
if (opMode == 'normal') {
await ctx.log.debug('UDS worker started on '+this.config.stateBase);
await ctx.log.info('UDS worker started on '+this.config.stateBase);
} else {
await ctx.log.silly('UDS worker started in mode '+opMode+' on '+this.config.stateBase);
}
Expand Down Expand Up @@ -187,7 +187,7 @@ class uds {
this.callback = null;
await this.storage.setOpMode('standby');
if (opMode == 'normal') {
await ctx.log.debug('UDS worker stopped on '+this.config.stateBase);
await ctx.log.info('UDS worker stopped on '+this.config.stateBase);
} else {
await ctx.log.silly('UDS worker stopped in mode '+opMode+' on '+this.config.stateBase);
}
Expand Down
6 changes: 3 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class E3oncan extends utils.Adapter {
async onReady() {
// Initialize your adapter here

await this.log.debug('Startup of instance '+this.namespace+': Starting.');
await this.log.info('Startup of instance '+this.namespace+': Starting.');
//await this.log.debug('this.config:');
//await this.log.debug(JSON.stringify(this.config));

Expand Down Expand Up @@ -133,7 +133,7 @@ class E3oncan extends utils.Adapter {

await this.subscribeStates('*.udsDidsToRead');

await this.log.debug('Startup of instance '+this.namespace+': Done.');
await this.log.info('Startup of instance '+this.namespace+': Done.');
}

// Setup CAN busses
Expand All @@ -146,7 +146,7 @@ class E3oncan extends utils.Adapter {
await channel.addListener('onMessage', onMsg, this);
await channel.start();
await this.setState('info.connection', true, true);
await this.log.debug('CAN-Adapter '+name+' successfully started.');
await this.log.info('CAN-Adapter '+name+' successfully started.');
} catch (e) {
await this.log.error(`Could not connect to CAN "${name}" - ${JSON.stringify(e)}`);
channel = null;
Expand Down

0 comments on commit 63fb99b

Please sign in to comment.