org.apache.log4j.spi.TriggeringEventEvaluator Java Examples
The following examples show how to use
org.apache.log4j.spi.TriggeringEventEvaluator.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SMTPAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
/** The <b>EvaluatorClass</b> option takes a string value representing the name of the class implementing the {@link TriggeringEventEvaluator} interface. A corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName(value, TriggeringEventEvaluator.class, evaluator); }
Example #2
Source File: SMTPAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
/** * Sets triggering evaluator. * @param trigger triggering event evaluator. * @since 1.2.15 */ public final void setEvaluator(final TriggeringEventEvaluator trigger) { if (trigger == null) { throw new NullPointerException("trigger"); } this.evaluator = trigger; }
Example #3
Source File: SMTPAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
/** {@inheritDoc} */ public boolean parseUnrecognizedElement(final Element element, final Properties props) throws Exception { if ("triggeringPolicy".equals(element.getNodeName())) { Object triggerPolicy = org.apache.log4j.xml.DOMConfigurator.parseElement( element, props, TriggeringEventEvaluator.class); if (triggerPolicy instanceof TriggeringEventEvaluator) { setEvaluator((TriggeringEventEvaluator) triggerPolicy); } return true; } return false; }
Example #4
Source File: SMTPAppenderTest.java From cacheonix-core with GNU Lesser General Public License v2.1 | 5 votes |
/** * Tests that triggeringPolicy element will set evaluator. */ public void testTrigger() { DOMConfigurator.configure("input/xml/smtpAppender1.xml"); SMTPAppender appender = (SMTPAppender) Logger.getRootLogger().getAppender("A1"); TriggeringEventEvaluator evaluator = appender.getEvaluator(); assertTrue(evaluator instanceof MockTriggeringEventEvaluator); }
Example #5
Source File: SMTPAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 4 votes |
/** Use <code>evaluator</code> passed as parameter as the {@link TriggeringEventEvaluator} for this SMTPAppender. */ public SMTPAppender(TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
Example #6
Source File: IMAppender.java From olat with Apache License 2.0 | 4 votes |
public IMAppender(final TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
Example #7
Source File: IMAppender.java From olat with Apache License 2.0 | 4 votes |
public IMAppender(final TriggeringEventEvaluator evaluator) { this.evaluator = evaluator; }
Example #8
Source File: SMTPAppender.java From cacheonix-core with GNU Lesser General Public License v2.1 | 2 votes |
/** * Get triggering evaluator. * @return triggering event evaluator. * @since 1.2.15 */ public final TriggeringEventEvaluator getEvaluator() { return evaluator; }
Example #9
Source File: IMAppender.java From olat with Apache License 2.0 | 2 votes |
/** * The <b>EvaluatorClass </b> option takes a string value representing the name of the class implementing the {@linkTriggeringEventEvaluator} interface. A * corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(final String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName(value, TriggeringEventEvaluator.class, evaluator); }
Example #10
Source File: IMAppender.java From olat with Apache License 2.0 | 2 votes |
/** * The <b>EvaluatorClass </b> option takes a string value representing the name of the class implementing the {@linkTriggeringEventEvaluator} interface. A * corresponding object will be instantiated and assigned as the triggering event evaluator for the SMTPAppender. */ public void setEvaluatorClass(final String value) { evaluator = (TriggeringEventEvaluator) OptionConverter.instantiateByClassName(value, TriggeringEventEvaluator.class, evaluator); }