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 <bo...@gmail.com> on 2016/12/04 20:59:30 UTC

Re: category = "Core"

I was under the impression that "Core" plugins were ones that followed the
basic @PluginFactory/@PluginBuilder pattern that corresponded to an XML
element. It's somewhat confusing honestly.

On 12 November 2016 at 02:05, Gary Gregory <ga...@gmail.com> wrote:

> I notice that we have Plugins that are NOT in log4j-core that
> use  category = "Core".
>
> Is that a hack or should these be changed to  category =
> "WhateverModuleILiveIn"?
>
> Gary
>
> --
> E-Mail: garydgregory@gmail.com | ggregory@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Matt Sicker <bo...@gmail.com>

Re: category = "Core"

Posted by Apache <ra...@dslextreme.com>.
The “core” category has nothing to do with what Log4j package the plugins are in. Rather, it has to do with where they are used. For example any Appender or Filter would be a “Core” plugin. This is because the plugin manager resolves plugins by the group they fall into. 

If you find all the usages of the PluginManager constructor you will find all the categories: 
	Converter for PatternConverters, 
	Lookup for Lookups, 
	KeyProvider for the secret key provider in Flume (or anything else that needs a secret key provided), 
	TypeConverter for the various type converters.
	ConfigurationFactory for the various ConfigurationFactory implementations.
	Core for everything else (i.e. - anything that can appear as a root component in a configuration as well as most of the sub-components - with the exception of PatternConverters and KeyProviders.

Again, the reason for the categories is so that a component can use the PluginManager to find the set of plugins that it wants to support. Thus the key for determining how the plugins are used is by knowing what code is creating a PluginManager.

Ralph


> On Dec 4, 2016, at 1:59 PM, Matt Sicker <bo...@gmail.com> wrote:
> 
> I was under the impression that "Core" plugins were ones that followed the basic @PluginFactory/@PluginBuilder pattern that corresponded to an XML element. It's somewhat confusing honestly.
> 
> On 12 November 2016 at 02:05, Gary Gregory <garydgregory@gmail.com <ma...@gmail.com>> wrote:
> I notice that we have Plugins that are NOT in log4j-core that use  category = "Core".
> 
> Is that a hack or should these be changed to  category = "WhateverModuleILiveIn"?
> 
> Gary
> 
> -- 
> E-Mail: garydgregory@gmail.com <ma...@gmail.com> | ggregory@apache.org  <ma...@apache.org>
> Java Persistence with Hibernate, Second Edition <https://www.amazon.com/gp/product/1617290459/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>  <http://ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1617290459>
> JUnit in Action, Second Edition <https://www.amazon.com/gp/product/1935182021/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22>  <http://ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182021>
> Spring Batch in Action <https://www.amazon.com/gp/product/1935182951/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>  <http://ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=1935182951>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
> Matt Sicker <boards@gmail.com <ma...@gmail.com>>