mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
logging: Logging framework to use only log4j (#4003)
Currently CloudStack is using logging frameworks as log4j and Java util logging, logging wrappers as slf4j and Apache common logging. Here changes are to made it uniform, using only log4j framework. Removed Java util logging, slf4j and Apache common logging.
This commit is contained in:
parent
567524a2a5
commit
a279d5c453
@ -51,7 +51,7 @@ import org.apache.cloudstack.utils.security.KeyStoreUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.MDC;
|
||||
import org.apache.log4j.MDC;
|
||||
|
||||
import com.cloud.agent.api.AgentControlAnswer;
|
||||
import com.cloud.agent.api.AgentControlCommand;
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
// under the License.
|
||||
package org.apache.cloudstack.api.command.admin.account;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
package org.apache.cloudstack.api.command.admin.router;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.api.APICommand;
|
||||
import org.apache.cloudstack.api.ApiCommandJobType;
|
||||
|
||||
@ -29,7 +29,7 @@ import org.apache.cloudstack.api.response.RegisterResponse;
|
||||
import org.apache.cloudstack.api.response.UserResponse;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
@APICommand(name = GetUserKeysCmd.APINAME,
|
||||
description = "This command allows the user to query the seceret and API keys for the account",
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
package org.apache.cloudstack.api.command.user.vmsnapshot;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
// under the License.
|
||||
package org.apache.cloudstack.api.command.user.vmsnapshot;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||
import org.apache.cloudstack.api.ACL;
|
||||
|
||||
@ -21,7 +21,7 @@ import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.MDC;
|
||||
import org.apache.log4j.MDC;
|
||||
|
||||
import org.apache.cloudstack.managed.threadlocal.ManagedThreadLocal;
|
||||
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
#
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
#
|
||||
|
||||
# This is the logging properties that goes to the war, there are two logging conf kept at the
|
||||
# svn, one for developement (one at src/test-resources) and other for producation
|
||||
|
||||
# Uncomment the next line to disable all logging.
|
||||
#org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
|
||||
|
||||
# Uncomment the next line to enable the simple log based logging
|
||||
#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
|
||||
|
||||
# Uncomment the next line to enable log4j based logging
|
||||
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
|
||||
@ -46,8 +46,7 @@ import org.eclipse.jetty.util.ssl.SslContextFactory;
|
||||
import org.eclipse.jetty.util.thread.QueuedThreadPool;
|
||||
import org.eclipse.jetty.util.thread.ScheduledExecutorScheduler;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.utils.PropertiesUtil;
|
||||
import com.google.common.base.Strings;
|
||||
@ -58,7 +57,7 @@ import com.google.common.base.Strings;
|
||||
* Configuration parameters are read from server.properties file available on the classpath.
|
||||
*/
|
||||
public class ServerDaemon implements Daemon {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(ServerDaemon.class);
|
||||
private static final Logger LOG = Logger.getLogger(ServerDaemon.class);
|
||||
private static final String WEB_XML = "META-INF/webapp/WEB-INF/web.xml";
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -49,7 +49,7 @@ import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
import org.apache.cloudstack.outofbandmanagement.dao.OutOfBandManagementDao;
|
||||
import org.apache.cloudstack.utils.identity.ManagementServerNode;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.slf4j.MDC;
|
||||
import org.apache.log4j.MDC;
|
||||
|
||||
import com.cloud.agent.AgentManager;
|
||||
import com.cloud.agent.Listener;
|
||||
@ -388,8 +388,9 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
||||
cmd.setContextParam("job", "job-" + job.getId());
|
||||
}
|
||||
}
|
||||
if (MDC.get("logcontextid") != null && !MDC.get("logcontextid").isEmpty()) {
|
||||
cmd.setContextParam("logid", MDC.get("logcontextid"));
|
||||
String logcontextid = (String) MDC.get("logcontextid");
|
||||
if (!Strings.isNullOrEmpty(logcontextid)) {
|
||||
cmd.setContextParam("logid", logcontextid);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
import org.slf4j.MDC;
|
||||
import org.apache.log4j.MDC;
|
||||
|
||||
import com.cloud.agent.api.Answer;
|
||||
import com.cloud.agent.api.Command;
|
||||
|
||||
@ -60,7 +60,7 @@ import org.apache.cloudstack.jobs.JobInfo;
|
||||
import org.apache.cloudstack.jobs.JobInfo.Status;
|
||||
import org.apache.cloudstack.managed.context.ManagedContextRunnable;
|
||||
import org.apache.cloudstack.utils.identity.ManagementServerNode;
|
||||
import org.slf4j.MDC;
|
||||
import org.apache.log4j.MDC;
|
||||
|
||||
import com.cloud.cluster.ClusterManagerListener;
|
||||
import org.apache.cloudstack.management.ManagementServerHost;
|
||||
|
||||
@ -29,8 +29,9 @@
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<version>${cs.log4j.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@ -18,8 +18,7 @@
|
||||
*/
|
||||
package org.apache.cloudstack.managed.context;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.managed.context.impl.DefaultManagedContext;
|
||||
|
||||
@ -27,7 +26,7 @@ public abstract class ManagedContextRunnable implements Runnable {
|
||||
|
||||
private static final int SLEEP_COUNT = 120;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ManagedContextRunnable.class);
|
||||
private static final Logger log = Logger.getLogger(ManagedContextRunnable.class);
|
||||
private static final ManagedContext DEFAULT_MANAGED_CONTEXT = new DefaultManagedContext();
|
||||
private static ManagedContext context;
|
||||
private static boolean managedContext = false;
|
||||
|
||||
@ -23,8 +23,7 @@ import java.util.Stack;
|
||||
import java.util.concurrent.Callable;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.managed.context.ManagedContext;
|
||||
import org.apache.cloudstack.managed.context.ManagedContextListener;
|
||||
@ -33,7 +32,7 @@ import org.apache.cloudstack.managed.threadlocal.ManagedThreadLocal;
|
||||
|
||||
public class DefaultManagedContext implements ManagedContext {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DefaultManagedContext.class);
|
||||
private static final Logger log = Logger.getLogger(DefaultManagedContext.class);
|
||||
|
||||
List<ManagedContextListener<?>> listeners = new CopyOnWriteArrayList<ManagedContextListener<?>>();
|
||||
|
||||
@ -88,7 +87,7 @@ public class DefaultManagedContext implements ManagedContext {
|
||||
if (firstError == null) {
|
||||
firstError = t;
|
||||
}
|
||||
log.error("Failed onEnterContext for listener [{}]", listener, t);
|
||||
log.error("Failed onEnterContext for listener: " + listener, t);
|
||||
}
|
||||
|
||||
/* Stack data structure is used because in between onEnter and onLeave
|
||||
@ -114,7 +113,7 @@ public class DefaultManagedContext implements ManagedContext {
|
||||
invocation.listener.onLeaveContext(invocation.data, reentry);
|
||||
} catch (Throwable t) {
|
||||
lastError = t;
|
||||
log.error("Failed onLeaveContext for listener [{}]", invocation.listener, t);
|
||||
log.error("Failed onLeaveContext for listener: [" + invocation.listener + "]", t);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,8 +21,7 @@ package org.apache.cloudstack.managed.threadlocal;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import org.apache.cloudstack.managed.context.ManagedContextUtils;
|
||||
|
||||
@ -36,7 +35,7 @@ public class ManagedThreadLocal<T> extends ThreadLocal<T> {
|
||||
};
|
||||
|
||||
private static boolean s_validateContext = false;
|
||||
private static final Logger log = LoggerFactory.getLogger(ManagedThreadLocal.class);
|
||||
private static final Logger log = Logger.getLogger(ManagedThreadLocal.class);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
|
||||
@ -29,8 +29,7 @@ import javax.management.MalformedObjectNameException;
|
||||
import javax.management.NotCompliantMBeanException;
|
||||
import javax.naming.ConfigurationException;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.utils.component.ComponentLifecycle;
|
||||
import com.cloud.utils.component.SystemIntegrityChecker;
|
||||
@ -40,7 +39,7 @@ import com.cloud.utils.mgmt.ManagementBean;
|
||||
|
||||
public class CloudStackExtendedLifeCycle extends AbstractBeanCollector {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackExtendedLifeCycle.class);
|
||||
private static final Logger log = Logger.getLogger(CloudStackExtendedLifeCycle.class);
|
||||
|
||||
Map<Integer, Set<ComponentLifecycle>> sorted = new TreeMap<Integer, Set<ComponentLifecycle>>();
|
||||
|
||||
@ -60,7 +59,7 @@ public class CloudStackExtendedLifeCycle extends AbstractBeanCollector {
|
||||
|
||||
protected void checkIntegrity() {
|
||||
for (SystemIntegrityChecker checker : getBeans(SystemIntegrityChecker.class)) {
|
||||
log.info("Running system integrity checker {}", checker);
|
||||
log.info("Running system integrity checker " + checker);
|
||||
|
||||
checker.check();
|
||||
}
|
||||
@ -114,7 +113,7 @@ public class CloudStackExtendedLifeCycle extends AbstractBeanCollector {
|
||||
try {
|
||||
lifecycle.configure(lifecycle.getName(), lifecycle.getConfigParams());
|
||||
} catch (ConfigurationException e) {
|
||||
log.error("Failed to configure {}", lifecycle.getName(), e);
|
||||
log.error("Failed to configure " + lifecycle.getName(), e);
|
||||
throw new CloudRuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,8 +22,7 @@ import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.utils.component.ComponentLifecycleBase;
|
||||
import com.cloud.utils.component.Named;
|
||||
@ -31,7 +30,7 @@ import com.cloud.utils.component.Registry;
|
||||
|
||||
public class DumpRegistry extends ComponentLifecycleBase {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DumpRegistry.class);
|
||||
private static final Logger log = Logger.getLogger(DumpRegistry.class);
|
||||
|
||||
List<Registry<?>> registries;
|
||||
|
||||
@ -56,7 +55,7 @@ public class DumpRegistry extends ComponentLifecycleBase {
|
||||
buffer.append(getName(o));
|
||||
}
|
||||
|
||||
log.info("Registry [{}] contains [{}]", registry.getName(), buffer);
|
||||
log.info("Registry [" + registry.getName() + "] contains [" + buffer + "]");
|
||||
}
|
||||
|
||||
return super.start();
|
||||
|
||||
@ -28,8 +28,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.BeanNameAware;
|
||||
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
@ -39,7 +38,7 @@ import com.cloud.utils.component.Registry;
|
||||
|
||||
public class ExtensionRegistry implements Registry<Object>, Configurable, BeanNameAware {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ExtensionRegistry.class);
|
||||
private static final Logger log = Logger.getLogger(ExtensionRegistry.class);
|
||||
|
||||
String name;
|
||||
String beanName;
|
||||
@ -112,7 +111,7 @@ public class ExtensionRegistry implements Registry<Object>, Configurable, BeanNa
|
||||
registered.add(item);
|
||||
}
|
||||
|
||||
log.debug("Registering extension [{}] in [{}]", name, this.name);
|
||||
log.debug("Registering extension [" + name + "] in [" + this.name + "]");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -23,8 +23,7 @@ import java.util.Iterator;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
@ -36,7 +35,7 @@ import com.cloud.utils.component.Registry;
|
||||
|
||||
public class RegistryLifecycle implements BeanPostProcessor, SmartLifecycle, ApplicationContextAware {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(RegistryLifecycle.class);
|
||||
private static final Logger log = Logger.getLogger(RegistryLifecycle.class);
|
||||
|
||||
public static final String EXTENSION_EXCLUDE = "extensions.exclude";
|
||||
public static final String EXTENSION_INCLUDE_PREFIX = "extensions.include.";
|
||||
@ -71,7 +70,7 @@ public class RegistryLifecycle implements BeanPostProcessor, SmartLifecycle, App
|
||||
|
||||
boolean result = excludes.contains(name);
|
||||
if (result) {
|
||||
log.info("Excluding extension [{}] based on configuration", name);
|
||||
log.info("Excluding extension [" + name + "] based on configuration");
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -110,7 +109,7 @@ public class RegistryLifecycle implements BeanPostProcessor, SmartLifecycle, App
|
||||
while (iter.hasNext()) {
|
||||
Object next = iter.next();
|
||||
if (registry.register(next)) {
|
||||
log.debug("Registered {}", next);
|
||||
log.debug("Registered " + next);
|
||||
} else {
|
||||
iter.remove();
|
||||
}
|
||||
|
||||
@ -24,8 +24,7 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.io.Resource;
|
||||
@ -37,7 +36,7 @@ import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
|
||||
public class CloudStackSpringContext {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackSpringContext.class);
|
||||
private static final Logger log = Logger.getLogger(CloudStackSpringContext.class);
|
||||
|
||||
public static final String CLOUDSTACK_CONTEXT_SERVLET_KEY = CloudStackSpringContext.class.getSimpleName();
|
||||
public static final String CLOUDSTACK_CONTEXT = "META-INF/cloudstack";
|
||||
@ -130,7 +129,7 @@ public class CloudStackSpringContext {
|
||||
String urlString = r.getURL().toExternalForm();
|
||||
urlList.add(urlString);
|
||||
} catch (IOException e) {
|
||||
log.error("Failed to create URL for {}", r.getDescription(), e);
|
||||
log.error("Failed to create URL for " + r.getDescription(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -33,8 +33,7 @@ import java.util.Set;
|
||||
import java.util.Stack;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.BeansException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
@ -49,7 +48,7 @@ import org.apache.cloudstack.spring.module.model.ModuleDefinitionSet;
|
||||
|
||||
public class DefaultModuleDefinitionSet implements ModuleDefinitionSet {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DefaultModuleDefinitionSet.class);
|
||||
private static final Logger log = Logger.getLogger(DefaultModuleDefinitionSet.class);
|
||||
|
||||
public static final String DEFAULT_CONFIG_RESOURCES = "DefaultConfigResources";
|
||||
public static final String DEFAULT_CONFIG_PROPERTIES = "DefaultConfigProperties";
|
||||
@ -101,7 +100,7 @@ public class DefaultModuleDefinitionSet implements ModuleDefinitionSet {
|
||||
ApplicationContext context = getApplicationContext(def.getName());
|
||||
try {
|
||||
Runnable runnable = context.getBean("moduleStartup", Runnable.class);
|
||||
log.info("Starting module [{}]", def.getName());
|
||||
log.info("Starting module [" + def.getName() + "]");
|
||||
runnable.run();
|
||||
} catch (BeansException e) {
|
||||
// Ignore
|
||||
@ -139,11 +138,11 @@ public class DefaultModuleDefinitionSet implements ModuleDefinitionSet {
|
||||
long start = System.currentTimeMillis();
|
||||
if (log.isInfoEnabled()) {
|
||||
for (Resource resource : resources) {
|
||||
log.info("Loading module context [{}] from {}", def.getName(), resource);
|
||||
log.info("Loading module context [" + def.getName() + "] from " + resource);
|
||||
}
|
||||
}
|
||||
context.refresh();
|
||||
log.info("Loaded module context [{}] in {} ms", def.getName(), (System.currentTimeMillis() - start));
|
||||
log.info("Loaded module context [" + def.getName() + "] in " + (System.currentTimeMillis() - start) + " ms");
|
||||
|
||||
contexts.put(def.getName(), context);
|
||||
|
||||
@ -238,7 +237,7 @@ public class DefaultModuleDefinitionSet implements ModuleDefinitionSet {
|
||||
return;
|
||||
|
||||
if (!shouldLoad(def)) {
|
||||
log.info("Excluding context [{}] based on configuration", def.getName());
|
||||
log.info("Excluding context [" + def.getName() + "] based on configuration");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -23,8 +23,7 @@ import java.io.IOException;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletContextEvent;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.web.context.ConfigurableWebApplicationContext;
|
||||
import org.springframework.web.context.ContextLoaderListener;
|
||||
@ -36,7 +35,7 @@ public class CloudStackContextLoaderListener extends ContextLoaderListener {
|
||||
public static final String WEB_PARENT_MODULE = "parentModule";
|
||||
public static final String WEB_PARENT_MODULE_DEFAULT = "web";
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CloudStackContextLoaderListener.class);
|
||||
private static final Logger log = Logger.getLogger(CloudStackContextLoaderListener.class);
|
||||
|
||||
CloudStackSpringContext cloudStackContext;
|
||||
String configuredParentName;
|
||||
|
||||
@ -261,7 +261,7 @@ cp client/target/lib/*jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib/
|
||||
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts
|
||||
rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms
|
||||
|
||||
for name in db.properties server.properties log4j-cloud.xml commons-logging.properties environment.properties java.security.ciphers
|
||||
for name in db.properties server.properties log4j-cloud.xml environment.properties java.security.ciphers
|
||||
do
|
||||
cp client/target/conf/$name ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name
|
||||
done
|
||||
@ -492,7 +492,6 @@ pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/log4j.xml
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/java.security.ciphers
|
||||
%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties
|
||||
%attr(0644,root,root) %{_unitdir}/%{name}-management.service
|
||||
%attr(0755,cloud,cloud) %{_localstatedir}/run/%{name}-management.pid
|
||||
%attr(0755,root,root) %{_bindir}/%{name}-setup-management
|
||||
|
||||
11
pom.xml
11
pom.xml
@ -170,7 +170,6 @@
|
||||
<cs.xapi.version>6.2.0-3.1</cs.xapi.version>
|
||||
<cs.xmlrpc.version>3.1.3</cs.xmlrpc.version>
|
||||
<cs.xstream.version>1.4.11.1</cs.xstream.version>
|
||||
<cs.slf4j.version>1.7.29</cs.slf4j.version>
|
||||
<org.springframework.version>5.2.3.RELEASE</org.springframework.version>
|
||||
</properties>
|
||||
|
||||
@ -627,16 +626,6 @@
|
||||
<artifactId>reflections</artifactId>
|
||||
<version>${cs.reflections.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${cs.slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<version>${cs.slf4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
|
||||
@ -63,14 +63,6 @@
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dbunit</groupId>
|
||||
<artifactId>dbunit</artifactId>
|
||||
|
||||
@ -50,14 +50,6 @@
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-nodep</artifactId>
|
||||
|
||||
@ -23,13 +23,10 @@ import java.util.Collection;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.backoff.BackoffAlgorithm;
|
||||
import com.cloud.utils.component.AdapterBase;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* An implementation of BackoffAlgorithm that waits for some seconds.
|
||||
@ -44,7 +41,7 @@ import com.cloud.utils.component.AdapterBase;
|
||||
public class ConstantTimeBackoff extends AdapterBase implements BackoffAlgorithm, ConstantTimeBackoffMBean {
|
||||
long _time;
|
||||
private final Map<String, Thread> _asleep = new ConcurrentHashMap<String, Thread>();
|
||||
private final static Log LOG = LogFactory.getLog(ConstantTimeBackoff.class);
|
||||
private static final Logger LOG = Logger.getLogger(ConstantTimeBackoff.class.getName());
|
||||
|
||||
@Override
|
||||
public void waitBeforeRetry() {
|
||||
|
||||
@ -27,7 +27,7 @@ import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
|
||||
|
||||
@ -24,8 +24,7 @@ import org.apache.commons.httpclient.ConnectTimeoutException;
|
||||
import org.apache.commons.httpclient.HttpClientError;
|
||||
import org.apache.commons.httpclient.params.HttpConnectionParams;
|
||||
import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
import javax.net.SocketFactory;
|
||||
import javax.net.ssl.SSLContext;
|
||||
@ -88,7 +87,7 @@ import java.net.UnknownHostException;
|
||||
public class EasySSLProtocolSocketFactory implements ProtocolSocketFactory {
|
||||
|
||||
/** Log object for this class. */
|
||||
private static final Log LOG = LogFactory.getLog(EasySSLProtocolSocketFactory.class);
|
||||
private static final Logger LOG = Logger.getLogger(EasySSLProtocolSocketFactory.class.getName());
|
||||
|
||||
private SSLContext sslcontext = null;
|
||||
|
||||
|
||||
@ -29,8 +29,7 @@ import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.TrustManagerFactory;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@ -58,7 +57,7 @@ public class EasyX509TrustManager implements X509TrustManager {
|
||||
private X509TrustManager standardTrustManager = null;
|
||||
|
||||
/** Log object for this class. */
|
||||
private static final Log LOG = LogFactory.getLog(EasyX509TrustManager.class);
|
||||
private static final Logger LOG = Logger.getLogger(EasyX509TrustManager.class.getName());
|
||||
|
||||
/**
|
||||
* Constructor for EasyX509TrustManager.
|
||||
@ -83,7 +82,7 @@ public class EasyX509TrustManager implements X509TrustManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.net.ssl.X509TrustManager#checkServerTrusted(X509Certificate[],String authType)
|
||||
* @see X509TrustManager#checkServerTrusted(X509Certificate[],String authType)
|
||||
*/
|
||||
@Override
|
||||
public void checkServerTrusted(X509Certificate[] certificates, String authType) throws CertificateException {
|
||||
|
||||
@ -21,13 +21,12 @@ package com.cloud.utils.backoff.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ConstantTimeBackoffTest {
|
||||
final static private Log LOG = LogFactory.getLog(ConstantTimeBackoffTest.class);
|
||||
private static final Logger LOG = Logger.getLogger(ConstantTimeBackoffTest.class.getName());
|
||||
|
||||
@Test
|
||||
public void waitBeforeRetryWithInterrupt() throws InterruptedException {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user