Skip to content

Commit

Permalink
fix LOGBACK-1605
Browse files Browse the repository at this point in the history
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
  • Loading branch information
ceki committed Dec 27, 2021
1 parent b0bc6b3 commit 716c906
Showing 1 changed file with 9 additions and 2 deletions.
Expand Up @@ -290,6 +290,7 @@ public void setMessage(String message) {
/**
* Return the {@link Instant} corresponding to the creation of this event.
*
* @see {@link #getTimeStamp()}
* @since 1.3
*/
public Instant getInstant() {
Expand All @@ -298,21 +299,27 @@ public Instant getInstant() {

/**
* Set {@link Instant} corresponding to the creation of this event.
*
* The value of {@link #getTimeStamp()} will be overridden as well.
*/
public void setInstant(Instant instant) {
initTmestampFields(instant);
}


/**
* Return the number of elapsed seconds since epoch in UTC.
* Return the number of elapsed milliseconds since epoch in UTC.
*/
public long getTimeStamp() {
return timeStamp;
}

/**
* Set the number of elapsed seconds since epoch in UTC.
* Set the number of elapsed milliseconds since epoch in UTC.
*
* Setting the timestamp will override the value contained in {@link #getInstant}.
* Nanoseconds value will be computed form the provided millisecond value.
*
*/
public void setTimeStamp(long timeStamp) {
Instant instant = Instant.ofEpochMilli(timeStamp);
Expand Down

0 comments on commit 716c906

Please sign in to comment.