Author: carnold Date: Thu Apr 12 15:20:18 2007 New Revision: 528258 URL: http://svn.apache.org/viewvc?view=rev&rev=528258 Log: Bug 42108: Add new LoggingEvent constructor from log4j 1.2
Modified: logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java Modified: logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java URL: http://svn.apache.org/viewvc/logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java?view=diff&rev=528258&r1=528257&r2=528258 ============================================================================== --- logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java (original) +++ logging/log4j/trunk/src/java/org/apache/log4j/spi/LoggingEvent.java Thu Apr 12 15:20:18 2007 @@ -258,6 +258,49 @@ } } + /** + Create new instance. + @since 1.2.15 + @param fqnOfCategoryClass Fully qualified class name + of Logger implementation. + @param logger The logger generating this event. + @param timeStamp the timestamp of this logging event + @param level The level of this event. + @param message The message of this event. + @param threadName thread name + @param throwable The throwable of this event. + @param ndc Nested diagnostic context + @param info Location info + @param properties MDC properties + */ + public LoggingEvent(final String fqnOfCategoryClass, + final Logger logger, + final long timeStamp, + final Level level, + final Object message, + final String threadName, + final ThrowableInformation throwable, + final String ndc, + final LocationInfo info, + final java.util.Map properties) { + this(); + this.setFQNOfLoggerClass(fqnOfCategoryClass); + this.setLogger(logger); + this.setLevel(level); + this.setMessage(message); + this.setThrowableInformation(throwable); + this.setTimeStamp(timeStamp); + this.setThreadName(threadName); + this.setNDC(ndc); + this.setLocationInformation(info); + if (properties instanceof Hashtable) { + this.setProperties((Hashtable) properties); + } else { + this.setProperties(new Hashtable(properties)); + } + } + + /** * Two events are considerd equal if they refer to the same instance, or if * both their timestamps and sequence numbers match. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]