[ 
https://issues.apache.org/jira/browse/LOG4J2-1891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tapan Choudhury updated LOG4J2-1891:
------------------------------------
    Attachment: Log4j2Plugins.dat

First I build with IDE and then tried with maven command line as well. I am 
attaching the .dat file which got created after the build. You can have a look 
at it as well.

> Creating Custom TriggeringPolicy
> --------------------------------
>
>                 Key: LOG4J2-1891
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1891
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Core
>    Affects Versions: 2.0.2
>            Reporter: Tapan Choudhury
>         Attachments: Log4j2Plugins.dat, Logfile.log, 
> RecordCountBasedTriggeringPolicy.java
>
>
> I want log files to be rolled over on every 20000 log entries. For this, I am 
> trying to create a Custom TriggeringPolicy which implements TriggeringPolicy 
> with Annotation of @Plugin(name = "NewTriggeringPolicy", category = "Core", 
> printObject = true).
> I have annotated method createPolicy with @PluginFactory.
> Also updated my pom file with the plugin as suggested @ 
> http://logging.apache.org/log4j/2.x/manual/plugins.html.
> In my log4j configuration file, when I mention something as below:
> <Policies>
>         < NewTriggeringPolicy recordCount="200"/>
>  </Policies>
> I am getting error as ERROR Policies contains an invalid element or attribute 
> "NewTriggeringPolicy".
> Please let me know what wrong I am doing here or if there is a better way to 
> do this.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to