lilith icon indicating copy to clipboard operation
lilith copied to clipboard

Make ports configurable

Open janArb opened this issue 11 years ago • 3 comments

I want to use the same log configuration for different log viewers, but cannot change the ports to listen to. Neither in Logback Beagle nor in Lilith. Why do all make this hardcoded? Of course one can change that in logback.xml and even add two socket appenders (stupid), but what if e.g. other services use the same ports? Never seen applications where ports cannot be changed. Maybe I'm missing something?

janArb avatar Feb 06 '14 12:02 janArb

Nope, this is currently indeed hardcoded. And it's also a bit embarrassing that this is the case.

The thing is that I would like to perform some serious refactoring in that part of Lilith (e.g. using netty as the network backend) - but I'm a bit occupied at the moment. I'd rather not add a UI for this right now, especially since I'm not just listening for one type of event but 14. This could end in a configuration nightmare if done hastily instead of in a sensible way.

So I currently go for "use a well-documented hardcoded port". This is arguably also laziness on my part since it's easier to support if questions arise.

But rest assured that this is on my todo list. I just can't give you any timings.

huxi avatar Feb 06 '14 19:02 huxi

I don't know who and why else uses Lilith, but my usecase and I believe that's where users hear of Lilith is Logback SocketAppender. So if you could at least make that one port configurable meanwhile? Or add an special option to change that port to the Logback/Beagle default one. This is also the most elegant Logback configuration, as this snippet (without port configuration) is enough for logback:

<configuration debug="true">
  <!-- sends logs to logback-beagle -->
  <consolePlugin />
</configuration>

This sends logs to port 4321, which is also hardcoded in Beagle doh!...

janArb avatar Feb 07 '14 07:02 janArb

I'll consider that option. Wouldn't be enabled by default, though, since a running Lilith would otherwise prevent Beagle from working. I wasn't aware of that configuration shortcut.

huxi avatar Feb 07 '14 09:02 huxi