Skip to content

Commit

Permalink
Correctly log elapsed milliseconds in CentralDogmaBeanFactory (line…
Browse files Browse the repository at this point in the history
…#991)

Motivation:

When the elapsed time in `CentralDogmaBeanFactory#get()` is logged, it prints nanoseconds with `ms` unit.

Modifications:

- Convert the elapsed time to milliseconds before logging.

Result:

The logs correctly display the elapsed time of obtaining the initial value.
  • Loading branch information
KarboniteKream authored Jul 23, 2024
1 parent 50299aa commit 086ea09
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ public <T> T get(T defaultValue, Class<T> beanType, Consumer<T> changeListener,
throw ex;
}
}
final long elapsedMillis = System.nanoTime() - t0;
final long elapsedMillis = TimeUnit.NANOSECONDS.toMillis(System.nanoTime() - t0);
logger.debug("Initial value of {} obtained in {} ms: rev={}",
settings, elapsedMillis, latest.revision());
}
Expand Down

0 comments on commit 086ea09

Please sign in to comment.