[java-identity-provider] 01/02: IDP-2115 Plugin Installer is doing logging wrongly

Rod Widdowson rdw at steadingsoftware.com
Fri May 19 12:59:14 UTC 2023


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=fa88811e5eccf77a9b7269c51cbe503cdb30a416

commit fa88811e5eccf77a9b7269c51cbe503cdb30a416
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri May 19 13:34:29 2023 +0100

    IDP-2115 Plugin Installer is doing logging wrongly
    
    https://shibboleth.atlassian.net/browse/IDP-2115
    
    Use delayed instantiaton logger.
---
 .../shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
index 8b472e272..304e148c5 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstallerCLI.java
@@ -57,6 +57,7 @@ import net.shibboleth.shared.cli.AbstractCommandLine;
 import net.shibboleth.shared.collection.CollectionSupport;
 import net.shibboleth.shared.component.ComponentInitializationException;
 import net.shibboleth.shared.logic.Constraint;
+import net.shibboleth.shared.primitive.LoggerFactory;
 import net.shibboleth.shared.primitive.StringSupport;
 import net.shibboleth.shared.spring.httpclient.resource.HTTPResource;
 import net.shibboleth.idp.plugin.PluginVersion;
@@ -67,7 +68,7 @@ import net.shibboleth.idp.plugin.PluginVersion;
 public final class PluginInstallerCLI extends AbstractIdPHomeAwareCommandLine<PluginInstallerArguments> {
 
     /** Class logger. */
-    @Nonnull final private Logger log = InstallationLogger.getLogger(PluginInstallerCLI.class);
+    private Logger log;
 
     /** A Plugin Installer to use. */
     @Nullable private PluginInstaller installer;
@@ -85,7 +86,11 @@ public final class PluginInstallerCLI extends AbstractIdPHomeAwareCommandLine<Pl
     /** {@inheritDoc} */
     @Override
     @Nonnull protected Logger getLogger() {
-        return log;
+        Logger theLog = log;
+        if (theLog == null) {
+            theLog = log = LoggerFactory.getLogger(PluginInstallerCLI.class);
+        }
+        return theLog;
     }
 
     /** {@inheritDoc} */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list