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 "Matt Sicker (JIRA)" <ji...@apache.org> on 2014/03/13 20:53:46 UTC

[jira] [Commented] (LOG4J2-321) Provide configuration alternative to system properties

    [ https://issues.apache.org/jira/browse/LOG4J2-321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13933958#comment-13933958 ] 

Matt Sicker commented on LOG4J2-321:
------------------------------------

In general, I think the class used to fetch property values should be replaceable. For instance, in OSGi, instead of directly using System.getProperty(), you would use [BundleContext.getProperty|http://www.osgi.org/javadoc/r4v43/core/org/osgi/framework/BundleContext.html#getProperty(java.lang.String)]. Although, I think that using System.getProperty will automagically use the BundleContext (which I think was introduced after the original OSGi specification).

Then there's obtaining the same properties via the ServletContext.getInitParameter(). Or what about javax.batch JobContext.getProperties? Or using JNDI?

Or should this all be using ContextSelector?

> Provide configuration alternative to system properties
> ------------------------------------------------------
>
>                 Key: LOG4J2-321
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-321
>             Project: Log4j 2
>          Issue Type: Bug
>    Affects Versions: 2.0-beta8
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.0-rc1
>
>
> Some components behaviour cannot be configured in the configuration file but only with System properties. There is a strong preference to ensure all behaviour can be configured in the configuration file.
> Properties that can be used to configure AsyncLoggers when all loggers are Async:
> * Log4jContextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector
> * AsyncLogger.ExceptionHandler
> * AsyncLogger.RingBufferSize
> * AsyncLogger.WaitStrategy
> * log4j.Clock - currently only used for timestamping RingBufferLogEvents. 
> Question: Should all LogEvents use this clock?
> The following system properties can be used to configure mixed Async Loggers:
> * AsyncLoggerConfig.ExceptionHandler	
> * AsyncLoggerConfig.RingBufferSize
> * AsyncLoggerConfig.WaitStrategy
> For JMX there is only the one "disable" property, in the mailing list it was suggested to make this into an element rather than an attribute to future-proof it.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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