LogMeister
LogMeister copied to clipboard
A bit DRYer
Just saw this and thought I make a quick change. Not tested, just wrote it in TextMate without compiling.
I would also propose to remove the different sendThis sendThat functions in the connectors and use a function that takes for example a LogType.WARN or LogType.INFO as a parameter.
Hi,
Thanks for the pull request, i like your change but i think it makes the code harder to read.. don't you agree? But I think most people use the .swc anyways..
What do you mean with the second comment?
I think you could shrink down all your connector classes and maybe others to just a few lines of code, by removing all the code that is basically copy & paste. And introducing MessageType in some sort, would make the code more readable yet smaller and DRYer. imho.
Additonaly I saw that there is no need to extend the AbstractConnector. I would rather use it in a compositional sense than an abstract.
I totally agree with you, but the code needs to be really readable :-)
The AbstractConnector is pretty lame, a static function to get the sender would be enough!