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 Paul Benedict <pb...@apache.org> on 2014/11/04 05:03:42 UTC

Logger and small message arguments

One thing I want out of log4j2 is the ability to do pass small-in-number
message parameters without paying the expense of constructing an object
array. I was a bit surprised not to see trace/debug/info/warn/fatal methods
that would accept 1, 2, and 3 message parameters. I think only after there
are 3 do you want to use varargs. This should cover more than 90% of the
common developer cases.

Thoughts?

Cheers,
Paul

Re: Logger and small message arguments

Posted by Paul Benedict <pb...@apache.org>.
Sounds like something for me to hack at =o) Thanks for the tip.


Cheers,
Paul

On Mon, Nov 3, 2014 at 11:07 PM, Ralph Goers <ra...@dslextreme.com>
wrote:

> You will see TODOs in the Logger class that mention doing exactly that.
>
> Patches are welcome!
>
> Ralph
>
> > On Nov 3, 2014, at 9:03 PM, Paul Benedict <pb...@apache.org> wrote:
> >
> > One thing I want out of log4j2 is the ability to do pass small-in-number
> message parameters without paying the expense of constructing an object
> array. I was a bit surprised not to see trace/debug/info/warn/fatal methods
> that would accept 1, 2, and 3 message parameters. I think only after there
> are 3 do you want to use varargs. This should cover more than 90% of the
> common developer cases.
> >
> > Thoughts?
> >
> > Cheers,
> > Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-dev-help@logging.apache.org
>
>

Re: Logger and small message arguments

Posted by Ralph Goers <ra...@dslextreme.com>.
You will see TODOs in the Logger class that mention doing exactly that.

Patches are welcome!

Ralph

> On Nov 3, 2014, at 9:03 PM, Paul Benedict <pb...@apache.org> wrote:
> 
> One thing I want out of log4j2 is the ability to do pass small-in-number message parameters without paying the expense of constructing an object array. I was a bit surprised not to see trace/debug/info/warn/fatal methods that would accept 1, 2, and 3 message parameters. I think only after there are 3 do you want to use varargs. This should cover more than 90% of the common developer cases.
> 
> Thoughts?
> 
> Cheers,
> Paul


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org