I am thinking about how a custom Logger implementation can leverage the new
functionality in 2.6, specifically the Scala API in LOG4J-1181 branch.

Logger.getMessageFactory() return MessageFactory, even though the sole
implementation in AbstractLogger do have a MessageFactory2 available.

It would be useful for a custom Logger implementation to get hold of
MessageFactory2, to be able to create CharSequence message etc.

On Fri, Jun 3, 2016 at 1:49 PM, Remko Popma <[email protected]> wrote:

> I don't see any problem with that.
> Let's make a similar change then also in ReusableMessageFactory.
>
> Sent from my iPhone
>
> On 2016/06/03, at 19:49, Mikael Ståldal <[email protected]> wrote:
>
> Would it make sense if AbstractMessageFactory was changed so that this
> method:
>
> @Override
> public Message newMessage(final Object message) {
>     return new ObjectMessage(message);
> }
>
> did this:
>
> @Override
> public Message newMessage(final Object message) {
>     if (message instanceof CharSequence) {
>         return new SimpleMessage((CharSequence) message)
>     } else {
>         return new ObjectMessage(message);
>     }
> }
>
>
> --
> [image: MagineTV]
>
> *Mikael Ståldal*
> Senior software developer
>
> *Magine TV*
> [email protected]
> Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com
>
> Privileged and/or Confidential Information may be contained in this
> message. If you are not the addressee indicated in this message
> (or responsible for delivery of the message to such a person), you may not
> copy or deliver this message to anyone. In such case,
> you should destroy this message and kindly notify the sender by reply
> email.
>
>


-- 
[image: MagineTV]

*Mikael Ståldal*
Senior software developer

*Magine TV*
[email protected]
Grev Turegatan 3  | 114 46 Stockholm, Sweden  |   www.magine.com

Privileged and/or Confidential Information may be contained in this
message. If you are not the addressee indicated in this message
(or responsible for delivery of the message to such a person), you may not
copy or deliver this message to anyone. In such case,
you should destroy this message and kindly notify the sender by reply
email.

Reply via email to