Re: my results thus far

2015-08-12 Thread Mikael Ståldal
Too bad that Java lacks named parameters to methods and constructors (as languages like Python and Scala have). On Wed, Aug 12, 2015 at 3:32 AM, Ralph Goers ralph.go...@dslextreme.com wrote: One of the principals Log4j 2 tries to follow is to create immutable objects as much as possible as it

Re: my results thus far

2015-08-12 Thread Xen
I realized one of my own classes had a builder object/class. The reason I did so was because I had to collect the relevant fields/parameters over time. As the result of progressing through a pattern-recognising state machine. My own target object was immutable, because it represented the

Re: my results thus far

2015-08-11 Thread Xen
Op 11-8-2015 om 21:07 schreef Gary Gregory: Some appenders use the builder patten, for example org.apache.logging.log4j.core.appender.ConsoleAppender.Builder. I'm not sure why this appender has both a builder and a create method. Does anyone? Gary Builders are nice, I guess. I don't really

my results thus far

2015-08-11 Thread Xen
Hi, I just wanted to give a little back of what I've been doing. I can say programmatic configuration the way it is is *really* hard. Mostly it is hard because of - having to import a million different things from different packages, and you can never guess or remember which package it is

Re: my results thus far

2015-08-11 Thread Gary Gregory
On Tue, Aug 11, 2015 at 11:11 AM, Xen x...@dds.nl wrote: Hi, I just wanted to give a little back of what I've been doing. I can say programmatic configuration the way it is is *really* hard. Mostly it is hard because of - having to import a million different things from different packages,

Re: my results thus far

2015-08-11 Thread Ralph Goers
One of the principals Log4j 2 tries to follow is to create immutable objects as much as possible as it reduces issues with multi- threading. This means not having setter methods. So you are left with builders, or factory methods and/or constructors with a lot of parameters. Ralph On Aug 11,