Skip to content

Commit

Permalink
correct log spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
donavanbecker committed Jun 26, 2024
1 parent 55bfbfa commit ed02c8c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ All notable changes to `hap-nodejs` will be documented in this file. This projec
- AdaptiveLightingController fix & improvement (#1038) (@Shaquu)
- Minor fixes to recording logging and one change in logging. (#1040) (@hjdhjd)
- Fix Build Issues (#1041) (@NorthernMan54)
- Correct log spacing
- Updated and fixed `typedoc` config file
- Updated dependencies

Expand Down
12 changes: 6 additions & 6 deletions src/lib/Characteristic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2941,12 +2941,12 @@ export class Characteristic extends EventEmitter {

if (this.props.validValueRanges && this.props.validValueRanges.length === 2) {
if (value < this.props.validValueRanges[0]) {
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of \
${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of `
+ `${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
value = this.props.validValueRanges[0];
} else if (value > this.props.validValueRanges[1]) {
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of \
${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
this.characteristicWarning(`characteristic was supplied illegal value: number ${value} not contained in valid value range of `
+ `${this.props.validValueRanges}, supplying illegal values will throw errors in the future`, warningType);
value = this.props.validValueRanges[1];
}
}
Expand All @@ -2966,8 +2966,8 @@ export class Characteristic extends EventEmitter {

// mirrors the case value = null at the beginning
if (value.length <= 1 && (this.UUID === Characteristic.Model.UUID || this.UUID === Characteristic.SerialNumber.UUID)) {
this.characteristicWarning(`[${this.displayName}] characteristic must have a length of more than 1 character otherwise \
HomeKit will reject this accessory, ignoring new value`, warningType);
this.characteristicWarning(`[${this.displayName}] characteristic must have a length of more than 1 character otherwise`
+ ` HomeKit will reject this accessory, ignoring new value ${warningType}`);
return this.value; // just return the current value
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/util/eventedhttp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,8 @@ export class HAPConnection extends EventEmitter {
}
}

console.log(`WARNING couldn't map socket coming from remote address ${socket.remoteAddress}:${socket.remotePort} \
at local address ${socket.localAddress} to a interface!`);
console.log(`WARNING couldn't map socket coming from remote address ${socket.remoteAddress}:${socket.remotePort} `
+ `at local address ${socket.localAddress} to a interface!`);

return Object.keys(interfaces)[1]; // just use the first interface after the loopback interface as fallback
}
Expand Down
4 changes: 2 additions & 2 deletions src/lib/util/tlv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ export function decodeWithLists(buffer: Buffer): Record<number, Buffer | Buffer[
result[type] = Buffer.concat([existing, data]);
}
} else {
throw new Error(`Found duplicated tlv entry with type ${type} and length ${length} \
(lastItemWasDelimiter: ${lastItemWasDelimiter}, lastType: ${lastType}, lastLength: ${lastLength})`);
throw new Error(`Found duplicated tlv entry with type ${type} and length ${length} `
+ `(lastItemWasDelimiter: ${lastItemWasDelimiter}, lastType: ${lastType}, lastLength: ${lastLength})`);
}
} else {
result[type] = data;
Expand Down

0 comments on commit ed02c8c

Please sign in to comment.