ceki 2004/05/10 02:12:25 Modified: src/java/org/apache/log4j/spi LoggingEvent.java Log: Added method for setting the NDC string. Revision Changes Path 1.54 +12 -0 logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java Index: LoggingEvent.java =================================================================== RCS file: /home/cvs/logging-log4j/src/java/org/apache/log4j/spi/LoggingEvent.java,v retrieving revision 1.53 retrieving revision 1.54 diff -u -r1.53 -r1.54 --- LoggingEvent.java 9 May 2004 19:15:03 -0000 1.53 +++ LoggingEvent.java 10 May 2004 09:12:25 -0000 1.54 @@ -479,6 +479,18 @@ return ndc; } + /** + * This method sets the NDC string for this event. + * @throws IllegalStateException if ndc had been already set. + * @since 1.3 + */ + public void setNDC(String ndcString) { + if (this.ndc != null) { + throw new IllegalStateException("The ndc has been already set."); + } + ndcLookupRequired = false; + ndc = ndcString; + } /** * Returns the the context corresponding to the <code>key</code> parameter.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]