Skip to content

Commit

Permalink
Bug 42108: Add new LoggingEvent constructor from log4j 1.2
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/trunk@528258 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
Curtis William Arnold committed Apr 12, 2007
1 parent 15c9fbf commit a9d39fe
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/java/org/apache/log4j/spi/LoggingEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,49 @@ public LoggingEvent(String fqnOfCategoryClass, Category logger, long timeStamp,
}
}

/**
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.
Expand Down

0 comments on commit a9d39fe

Please sign in to comment.