aboutsummaryrefslogtreecommitdiffstats
path: root/container-disc
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-02-18 18:15:02 +0100
committerHarald Musum <musum@verizonmedia.com>2020-02-18 18:15:02 +0100
commita4a78b283d268d7931cc002848429f65e01d1a68 (patch)
treedfe860c7c1629c67347a2081159983631d398e04 /container-disc
parent4cfb067c79659b80ca6808537d283125dbc0e2dc (diff)
Use supplier syntaax for debug log messages
Diffstat (limited to 'container-disc')
-rw-r--r--container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
index 70c48706803..bb9e10fb6b2 100644
--- a/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
+++ b/container-disc/src/main/java/com/yahoo/container/jdisc/component/Deconstructor.java
@@ -50,11 +50,11 @@ public class Deconstructor implements ComponentDeconstructor {
}
} else if (component instanceof Provider) {
// TODO Providers should most likely be deconstructed similarly to AbstractComponent
- log.log(LogLevel.DEBUG, "Starting deconstruction of provider " + component);
+ log.log(LogLevel.DEBUG, () -> "Starting deconstruction of provider " + component);
((Provider<?>) component).deconstruct();
- log.log(LogLevel.DEBUG, "Finished deconstruction of provider " + component);
+ log.log(LogLevel.DEBUG, () -> "Finished deconstruction of provider " + component);
} else if (component instanceof SharedResource) {
- log.log(LogLevel.DEBUG, "Releasing container reference to resource " + component);
+ log.log(LogLevel.DEBUG, () -> "Releasing container reference to resource " + component);
// No need to delay release, as jdisc does ref-counting
((SharedResource) component).release();
}
@@ -87,10 +87,10 @@ public class Deconstructor implements ComponentDeconstructor {
@Override
public void run() {
for (var component : components) {
- log.log(LogLevel.DEBUG, "Starting deconstruction of component " + component);
+ log.log(LogLevel.DEBUG, () -> "Starting deconstruction of component " + component);
try {
component.deconstruct();
- log.log(LogLevel.DEBUG, "Finished deconstructing of component " + component);
+ log.log(LogLevel.DEBUG, () -> "Finished deconstructing of component " + component);
} catch (Exception | NoClassDefFoundError e) { // May get class not found due to it being already unloaded
log.log(WARNING, "Exception thrown when deconstructing component " + component, e);
} catch (Error e) {
@@ -110,7 +110,7 @@ public class Deconstructor implements ComponentDeconstructor {
// It should now be safe to uninstall the old bundles.
for (var bundle : bundles) {
try {
- log.log(LogLevel.DEBUG, "Uninstalling bundle " + bundle);
+ log.log(LogLevel.DEBUG, () -> "Uninstalling bundle " + bundle);
bundle.uninstall();
} catch (BundleException e) {
log.log(SEVERE, "Could not uninstall bundle " + bundle);