It occurs to me that given the way Log4j and Logback work they probably always 
have a root logger that starts out not configured with an appender. I guess it 
would make sense for us to do the same.  I do think it makes sense to emit a 
warning when no root logger is specified.

I agree with your points about the use of location in the examples. It would 
probably make sense though to have a section that does have examples that 
clearly calls out the overhead of using them.

Ralph

On Apr 26, 2013, at 11:04 PM, Remko Popma wrote:

> On the log4j user mailing list I encountered a user who had made a few wrong 
> turns, config-wise, and had trouble getting back on track.
> 
> One issue was that by default the File appender is buffered but does not 
> flush.
> So his log file stayed empty and he had trouble figuring out why.
> 
> Should we change the examples a little?
> * use bufferedIO=false in all File appender examples?
> * add a comment that the root logger is mandatory (LOG4J2-219)
> 
> Also I would like to propose (and opinions may differ on this one)
> to avoid using layouts that use location in the examples,
> unless the example is used to explain how location works.
> (E.g., the API > Flow Tracing page would need location layout examples.)
> 
> Currently most examples use %C and %M and I would greatly prefer that the 
> examples use %c and other layouts that do not include location. 
> 
> I believe that many people will start using Log4j by copying an example and 
> only read the manual when they get stuck.
> I would hate to give first-time users the impression that Log4j is slow and 
> have our own example configs to blame... :-)
> 
> On the same topic, in the layouts page I would like to add remarks describing 
> performance impact to the attributes that include location.
> 
> Thoughts?

Reply via email to