-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Log instead of throwing exception when generateDefinition can ha…
…ndle only 1 endpoint (#7001) * Soft fail on multiple Electricity Meter endpoints Apparently throwing here prevents Z2M from starting. I set it to assert in the log instead, but I'll let you change if needed @Koenkk since you co-authored the [PR](a1b6c28) Ref: Koenkk/zigbee2mqtt#21170 * fix CI * updates --------- Co-authored-by: koenkk <koenkanters94@gmail.com>
- Loading branch information
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Logger} from './types'; | ||
|
||
export let logger: Logger = { | ||
info: (msg) => console.log(msg), | ||
warn: (msg) => console.warn(msg), | ||
error: (msg) => console.error(msg), | ||
debug: (msg) => console.debug(msg), | ||
}; | ||
|
||
export function setLogger(l: Logger) { | ||
logger = l; | ||
} |