hap-java / HAP-Java

Java implementation of the HomeKit Accessory Protocol
MIT License
155 stars 82 forks source link

Accessory names are logged incorrectly #150

Closed MariusVolkhart closed 2 years ago

MariusVolkhart commented 3 years ago

HomekitRoot logs accessory names incorrectly. It logs the CompletableFuture, not the result of it. See first 3 log lines.

Expected log:

2021-11-27 19:53:24,561 TRACE i.g.h.s.i.HomekitRoot Added accessory Test Bridge
2021-11-27 19:53:24,632 TRACE i.g.h.s.i.HomekitRoot Added accessory Lamp 1
2021-11-27 19:53:24,633 TRACE i.g.h.s.i.HomekitRoot Added accessory Lamp 2
2021-11-27 19:53:25,648 INFO  i.n.h.l.LoggingHandler [id: 0x40d0eabf] REGISTERED
2021-11-27 19:53:25,658 INFO  i.n.h.l.LoggingHandler [id: 0x40d0eabf] BIND: shortcut/127.0.1.1:9123
2021-11-27 19:53:25,661 TRACE i.g.h.s.i.h.i.NettyHomekitHttpService Bound homekit listener to /127.0.1.1:9123
2021-11-27 19:53:25,668 TRACE i.g.h.s.i.j.JmdnsHomekitAdvertiser Advertising accessory Test Bridge
2021-11-27 19:53:25,669 INFO  i.g.h.s.i.j.JmdnsHomekitAdvertiser Registering _hap._tcp.local. on port 9123
2021-11-27 19:53:25,670 TRACE i.g.h.s.i.j.JmdnsHomekitAdvertiser MAC:e6:f6:d4:94:22:55 Setup Id:GV17
2021-11-27 19:53:25,701 INFO  i.n.h.l.LoggingHandler [id: 0x40d0eabf, L:/127.0.1.1:9123] ACTIVE

Actual log:

2021-11-27 20:00:56,544 TRACE i.g.h.s.i.HomekitRoot Added accessory java.util.concurrent.CompletableFuture@1065d67[Completed normally]
2021-11-27 20:00:56,616 TRACE i.g.h.s.i.HomekitRoot Added accessory java.util.concurrent.CompletableFuture@19df09a[Completed normally]
2021-11-27 20:00:56,618 TRACE i.g.h.s.i.HomekitRoot Added accessory java.util.concurrent.CompletableFuture@1df23d3[Completed normally]
2021-11-27 20:00:57,580 INFO  i.n.h.l.LoggingHandler [id: 0x0fb4b526] REGISTERED
2021-11-27 20:00:57,590 INFO  i.n.h.l.LoggingHandler [id: 0x0fb4b526] BIND: shortcut/127.0.1.1:9123
2021-11-27 20:00:57,594 TRACE i.g.h.s.i.h.i.NettyHomekitHttpService Bound homekit listener to /127.0.1.1:9123
2021-11-27 20:00:57,600 TRACE i.g.h.s.i.j.JmdnsHomekitAdvertiser Advertising accessory Test Bridge
2021-11-27 20:00:57,602 INFO  i.g.h.s.i.j.JmdnsHomekitAdvertiser Registering _hap._tcp.local. on port 9123
2021-11-27 20:00:57,603 TRACE i.g.h.s.i.j.JmdnsHomekitAdvertiser MAC:e6:f6:d4:94:22:55 Setup Id:6GSE
2021-11-27 20:00:57,638 INFO  i.n.h.l.LoggingHandler [id: 0x0fb4b526, L:/127.0.1.1:9123] ACTIVE