fabiolb / fabio

Consul Load-Balancing made simple
https://fabiolb.net
MIT License
7.27k stars 616 forks source link

log.routes.format is broken with 1.5.13 #737

Closed scalp42 closed 4 years ago

scalp42 commented 4 years ago

Hi folks,

Using log.routes.format = all, the Fabio logs appear to be broken:

Dec 17 19:10:04 fabio-i-0ec2ac85dcac2e3f1 fabio[23101]: 2019/12/17 19:10:04 [INFO] Updated config to
Dec 17 19:10:04 fabio-i-0ec2ac85dcac2e3f1 fabio[23101]: 2019/12/17 19:10:04 [INFO] Updated config to
Dec 17 19:10:07 fabio-i-0ec2ac85dcac2e3f1 fabio[23101]: 2019/12/17 19:10:07 [INFO] Updated config to

Changing to log.routes.format = delta, it doesn't actually show anything at all in logs.

Only log.routes.format = detail seems to work now.

Thanks in advance

aaronhurt commented 4 years ago

@scalp42 Thank you for the report. I'll try and take a look at this over the break.

aaronhurt commented 4 years ago

Taking a TODO here. Sorry again for the delay.

scalp42 commented 4 years ago

Please don't be sorry, @leprechau you're appreciated 🙌

aaronhurt commented 4 years ago

@scalp42 digging into this now, I'll let you know what I find.

aaronhurt commented 4 years ago

So, I see what's happening. The next and last variables aren't being set. They're empty when passed to the logger. I'm guessing this has something to do with the change to using a buffer instead of string concatenation for the routing table.

I don't know why it's happening yet, but I at least know where to look and can reproduce the problem. This also affects current master branch.

aaronhurt commented 4 years ago

Thank you for your patience @scalp42, this fix will be included in the next release.

scalp42 commented 4 years ago

@leprechau thank you again for the fix, it's much appreciated!