You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Mike Hurd <mi...@voxsurf.com> on 2001/05/24 14:27:26 UTC

Help on property file settings for Appenders and Layouts

Hi all,
	I'm just trialing Log4J as a new logging solution for our system and I'm
trying to configure the appenders and layouts by property file. Is there any
documentation of the possible property settings for each of the Log4J
classes (e.g DailyRollingFileAppender and HTMLLayout). Looking through the
exxamples they show a few of the settings but not all of them, where would I
find the rest?

regards,
	Mike Hurd


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


Re: Help on property file settings for Appenders and Layouts

Posted by Ceki Gülcü <cg...@qos.ch>.
Anders,

I don't think that is a good idea. Having two points of documentation requires updates at those two points. We all know  how difficult it is to keep documentation up to date. 

The setter methods define the configuration options. That's a nice and simple rule to remember. It may not be perfect but it is simple. Regards, Ceki

At 18:46 25.05.2001 -0400, you wrote:
>Maybe it would be useful for us to have a convention of listing all
>configurable properties of components in the "class-level" javadoc
>comment. For each property there'd be the name and a link to the
>associated setter method. I s'pose not all setters are necessarily
>intended for configuration.
>
>Anders
>
>
>Ceki Gülcü wrote:
>> 
>> At 13:27 24.05.2001 +0100, you wrote:
>> >Hi all,
>> >        I'm just trialing Log4J as a new logging solution for our system and I'm
>> >trying to configure the appenders and layouts by property file. Is there any
>> >documentation of the possible property settings for each of the Log4J
>> >classes (e.g DailyRollingFileAppender and HTMLLayout). Looking through the
>> >exxamples they show a few of the settings but not all of them, where would I
>> >find the rest?
>> >
>> >regards,
>> >        Mike Hurd
>> 
>> This is a new FAQ entry:
>> 
>> What are the configurable options for FooBarAppender?
>> 
>> Log4j uses JavaBeans style configuration.
>> 
>> Thus, any setter method in FooBarAppender corresponds to a configurable option. For example, in RollingFileAppender the setMaxBackupIndex(int maxBackups) method corresponds to the maxBackupIndex option. The first letter of the option can be upper case, i.e. MaxBackupIndex and maxBackupIndex are equivalent but not MAXBACKUPIndex nor mAXBackupIndex.
>> 
>> Layouts options are also defined by their setter methods. Same goes for most other log4j components.
>> 
>> Hope this answers the question. Ceki
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: log4j-user-help@jakarta.apache.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-user-help@jakarta.apache.org

--
Ceki Gülcü


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


Re: Help on property file settings for Appenders and Layouts

Posted by Anders Kristensen <ak...@dynamicsoft.com>.
Maybe it would be useful for us to have a convention of listing all
configurable properties of components in the "class-level" javadoc
comment. For each property there'd be the name and a link to the
associated setter method. I s'pose not all setters are necessarily
intended for configuration.

Anders


Ceki Gülcü wrote:
> 
> At 13:27 24.05.2001 +0100, you wrote:
> >Hi all,
> >        I'm just trialing Log4J as a new logging solution for our system and I'm
> >trying to configure the appenders and layouts by property file. Is there any
> >documentation of the possible property settings for each of the Log4J
> >classes (e.g DailyRollingFileAppender and HTMLLayout). Looking through the
> >exxamples they show a few of the settings but not all of them, where would I
> >find the rest?
> >
> >regards,
> >        Mike Hurd
> 
> This is a new FAQ entry:
> 
> What are the configurable options for FooBarAppender?
> 
> Log4j uses JavaBeans style configuration.
> 
> Thus, any setter method in FooBarAppender corresponds to a configurable option. For example, in RollingFileAppender the setMaxBackupIndex(int maxBackups) method corresponds to the maxBackupIndex option. The first letter of the option can be upper case, i.e. MaxBackupIndex and maxBackupIndex are equivalent but not MAXBACKUPIndex nor mAXBackupIndex.
> 
> Layouts options are also defined by their setter methods. Same goes for most other log4j components.
> 
> Hope this answers the question. Ceki
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-user-help@jakarta.apache.org

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


Re: Help on property file settings for Appenders and Layouts

Posted by Ceki Gülcü <cg...@qos.ch>.
At 13:27 24.05.2001 +0100, you wrote:
>Hi all,
>        I'm just trialing Log4J as a new logging solution for our system and I'm
>trying to configure the appenders and layouts by property file. Is there any
>documentation of the possible property settings for each of the Log4J
>classes (e.g DailyRollingFileAppender and HTMLLayout). Looking through the
>exxamples they show a few of the settings but not all of them, where would I
>find the rest?
>
>regards,
>        Mike Hurd

This is a new FAQ entry:


What are the configurable options for FooBarAppender?

Log4j uses JavaBeans style configuration. 

Thus, any setter method in FooBarAppender corresponds to a configurable option. For example, in RollingFileAppender the setMaxBackupIndex(int maxBackups) method corresponds to the maxBackupIndex option. The first letter of the option can be upper case, i.e. MaxBackupIndex and maxBackupIndex are equivalent but not MAXBACKUPIndex nor mAXBackupIndex. 

Layouts options are also defined by their setter methods. Same goes for most other log4j components. 


Hope this answers the question. Ceki


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