You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Matt Sicker <bo...@gmail.com> on 2014/03/02 22:33:48 UTC

Found an oddly named class in log4j-core.

org.apache.logging.log4j.core.AbstractServer

1. It's not abstract.
2. As it's not abstract, there are no abstract methods or any common
interface really.

That being said, would it make more sense for this to be an interface with
a simple log(LogEvent) method defined? Perhaps calling this class
"AbstractServer", while demonstrating its usage, is a poor name for what it
actually does.

-- 
Matt Sicker <bo...@gmail.com>

Re: Found an oddly named class in log4j-core.

Posted by Matt Sicker <bo...@gmail.com>.
Done in r1574222.


On 2 March 2014 20:16, Matt Sicker <bo...@gmail.com> wrote:

> I don't believe I've received any follow-up yet on the account.
>
>
> On 2 March 2014 19:30, Ralph Goers <rg...@apache.org> wrote:
>
>> Fine by me. If you have gotten your account set up go ahead and make the
>> change.
>>
>> Sent from my iPad
>>
>> On Mar 2, 2014, at 2:01 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>> How about something like LogListener or LogEventListener? It definitely
>> follows the pattern to be a listener class.
>>
>>
>> On 2 March 2014 15:55, Ralph Goers <ra...@dslextreme.com> wrote:
>>
>>> While it is not truly abstract it does act as the base class for
>>> AbstractJMSReceiver (which JMSQueueReceiver and JMSTopicReceiver both
>>> extend), SocketServer, and UDPSocketServer.  On its own, AbstractServer
>>> doesn’t really do anything. But they all end up calling the log method,
>>> which is really why AbstractServer exists.
>>>
>>> An interface provides no functionality.  The point of the class is that
>>> all the Receivers share the log method implementation.
>>>
>>> While the name may not be accurate, several of us dislike naming classes
>>> “Base”Xxxxx or XxxxxBase (i.e. ServerBase, ReceiverBase, etc).  If you can
>>> suggest a better name I’d be OK with changing it.
>>>
>>> Ralph
>>>
>>> On Mar 2, 2014, at 1:33 PM, Matt Sicker <bo...@gmail.com> wrote:
>>>
>>> org.apache.logging.log4j.core.AbstractServer
>>>
>>> 1. It's not abstract.
>>> 2. As it's not abstract, there are no abstract methods or any common
>>> interface really.
>>>
>>> That being said, would it make more sense for this to be an interface
>>> with a simple log(LogEvent) method defined? Perhaps calling this class
>>> "AbstractServer", while demonstrating its usage, is a poor name for what it
>>> actually does.
>>>
>>> --
>>> Matt Sicker <bo...@gmail.com>
>>>
>>>
>>>
>>
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Found an oddly named class in log4j-core.

Posted by Matt Sicker <bo...@gmail.com>.
I don't believe I've received any follow-up yet on the account.


On 2 March 2014 19:30, Ralph Goers <rg...@apache.org> wrote:

> Fine by me. If you have gotten your account set up go ahead and make the
> change.
>
> Sent from my iPad
>
> On Mar 2, 2014, at 2:01 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> How about something like LogListener or LogEventListener? It definitely
> follows the pattern to be a listener class.
>
>
> On 2 March 2014 15:55, Ralph Goers <ra...@dslextreme.com> wrote:
>
>> While it is not truly abstract it does act as the base class for
>> AbstractJMSReceiver (which JMSQueueReceiver and JMSTopicReceiver both
>> extend), SocketServer, and UDPSocketServer.  On its own, AbstractServer
>> doesn’t really do anything. But they all end up calling the log method,
>> which is really why AbstractServer exists.
>>
>> An interface provides no functionality.  The point of the class is that
>> all the Receivers share the log method implementation.
>>
>> While the name may not be accurate, several of us dislike naming classes
>> “Base”Xxxxx or XxxxxBase (i.e. ServerBase, ReceiverBase, etc).  If you can
>> suggest a better name I’d be OK with changing it.
>>
>> Ralph
>>
>> On Mar 2, 2014, at 1:33 PM, Matt Sicker <bo...@gmail.com> wrote:
>>
>> org.apache.logging.log4j.core.AbstractServer
>>
>> 1. It's not abstract.
>> 2. As it's not abstract, there are no abstract methods or any common
>> interface really.
>>
>> That being said, would it make more sense for this to be an interface
>> with a simple log(LogEvent) method defined? Perhaps calling this class
>> "AbstractServer", while demonstrating its usage, is a poor name for what it
>> actually does.
>>
>> --
>> Matt Sicker <bo...@gmail.com>
>>
>>
>>
>
>
> --
> Matt Sicker <bo...@gmail.com>
>
>


-- 
Matt Sicker <bo...@gmail.com>

Re: Found an oddly named class in log4j-core.

Posted by Ralph Goers <rg...@apache.org>.
Fine by me. If you have gotten your account set up go ahead and make the change.

Sent from my iPad

> On Mar 2, 2014, at 2:01 PM, Matt Sicker <bo...@gmail.com> wrote:
> 
> How about something like LogListener or LogEventListener? It definitely follows the pattern to be a listener class.
> 
> 
>> On 2 March 2014 15:55, Ralph Goers <ra...@dslextreme.com> wrote:
>> While it is not truly abstract it does act as the base class for AbstractJMSReceiver (which JMSQueueReceiver and JMSTopicReceiver both extend), SocketServer, and UDPSocketServer.  On its own, AbstractServer doesn’t really do anything. But they all end up calling the log method, which is really why AbstractServer exists.
>> 
>> An interface provides no functionality.  The point of the class is that all the Receivers share the log method implementation. 
>> 
>> While the name may not be accurate, several of us dislike naming classes “Base”Xxxxx or XxxxxBase (i.e. ServerBase, ReceiverBase, etc).  If you can suggest a better name I’d be OK with changing it.  
>> 
>> Ralph
>> 
>>> On Mar 2, 2014, at 1:33 PM, Matt Sicker <bo...@gmail.com> wrote:
>>> 
>>> org.apache.logging.log4j.core.AbstractServer
>>> 
>>> 1. It's not abstract.
>>> 2. As it's not abstract, there are no abstract methods or any common interface really.
>>> 
>>> That being said, would it make more sense for this to be an interface with a simple log(LogEvent) method defined? Perhaps calling this class "AbstractServer", while demonstrating its usage, is a poor name for what it actually does.
>>> 
>>> -- 
>>> Matt Sicker <bo...@gmail.com>
> 
> 
> 
> -- 
> Matt Sicker <bo...@gmail.com>

Re: Found an oddly named class in log4j-core.

Posted by Matt Sicker <bo...@gmail.com>.
How about something like LogListener or LogEventListener? It definitely
follows the pattern to be a listener class.


On 2 March 2014 15:55, Ralph Goers <ra...@dslextreme.com> wrote:

> While it is not truly abstract it does act as the base class for
> AbstractJMSReceiver (which JMSQueueReceiver and JMSTopicReceiver both
> extend), SocketServer, and UDPSocketServer.  On its own, AbstractServer
> doesn’t really do anything. But they all end up calling the log method,
> which is really why AbstractServer exists.
>
> An interface provides no functionality.  The point of the class is that
> all the Receivers share the log method implementation.
>
> While the name may not be accurate, several of us dislike naming classes
> “Base”Xxxxx or XxxxxBase (i.e. ServerBase, ReceiverBase, etc).  If you can
> suggest a better name I’d be OK with changing it.
>
> Ralph
>
> On Mar 2, 2014, at 1:33 PM, Matt Sicker <bo...@gmail.com> wrote:
>
> org.apache.logging.log4j.core.AbstractServer
>
> 1. It's not abstract.
> 2. As it's not abstract, there are no abstract methods or any common
> interface really.
>
> That being said, would it make more sense for this to be an interface with
> a simple log(LogEvent) method defined? Perhaps calling this class
> "AbstractServer", while demonstrating its usage, is a poor name for what it
> actually does.
>
> --
> Matt Sicker <bo...@gmail.com>
>
>
>


-- 
Matt Sicker <bo...@gmail.com>

Re: Found an oddly named class in log4j-core.

Posted by Ralph Goers <ra...@dslextreme.com>.
While it is not truly abstract it does act as the base class for AbstractJMSReceiver (which JMSQueueReceiver and JMSTopicReceiver both extend), SocketServer, and UDPSocketServer.  On its own, AbstractServer doesn’t really do anything. But they all end up calling the log method, which is really why AbstractServer exists.

An interface provides no functionality.  The point of the class is that all the Receivers share the log method implementation. 

While the name may not be accurate, several of us dislike naming classes “Base”Xxxxx or XxxxxBase (i.e. ServerBase, ReceiverBase, etc).  If you can suggest a better name I’d be OK with changing it.  

Ralph

On Mar 2, 2014, at 1:33 PM, Matt Sicker <bo...@gmail.com> wrote:

> org.apache.logging.log4j.core.AbstractServer
> 
> 1. It's not abstract.
> 2. As it's not abstract, there are no abstract methods or any common interface really.
> 
> That being said, would it make more sense for this to be an interface with a simple log(LogEvent) method defined? Perhaps calling this class "AbstractServer", while demonstrating its usage, is a poor name for what it actually does.
> 
> -- 
> Matt Sicker <bo...@gmail.com>