Author: cziegeler
Date: Fri Sep 10 10:12:34 2010
New Revision: 995732
URL: http://svn.apache.org/viewvc?rev=995732&view=rev
Log:
SLING-1746 : Use slf4j instead of log service
Removed:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Logger.java
Modified:
sling/trunk/installer/osgi/installer/pom.xml
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Activator.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerContext.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerImpl.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/PersistentResourceList.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigInstallTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigRemoveTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleInstallTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleStartTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleUpdateTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/PersistentBundleInfo.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SynchronousRefreshPackagesTask.java
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SystemBundleUpdateTask.java
Modified: sling/trunk/installer/osgi/installer/pom.xml
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/pom.xml?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
--- sling/trunk/installer/osgi/installer/pom.xml (original)
+++ sling/trunk/installer/osgi/installer/pom.xml Fri Sep 10 10:12:34 2010
@@ -118,10 +118,24 @@
<artifactId>org.osgi.compendium</artifactId>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <!-- We use a class from the config admin implementation to read config
files -->
+ <dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.2.4</version>
<scope>provided</scope>
</dependency>
+ <!-- Basic dependencies for Unit Tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </dependency>
</dependencies>
</project>
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Activator.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Activator.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Activator.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/Activator.java
Fri Sep 10 10:12:34 2010
@@ -25,7 +25,6 @@ import org.osgi.framework.BundleActivato
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
import org.osgi.framework.ServiceRegistration;
-import org.osgi.util.tracker.ServiceTracker;
/**
* The activator sets up the logging and registers the
@@ -33,27 +32,16 @@ import org.osgi.util.tracker.ServiceTrac
*/
public class Activator implements BundleActivator {
- /** Interface of the log service */
- private static String LOG_SERVICE_NAME = "org.osgi.service.log.LogService";
-
/** Vendor of all registered services. */
private static final String VENDOR = "The Apache Software Foundation";
private OsgiInstallerImpl osgiControllerService;
private ServiceRegistration osgiControllerServiceReg;
- /** Tracker for the log service. */
- private ServiceTracker logServiceTracker;
-
/**
* @see
org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(final BundleContext context) throws Exception {
- // setup logging
- this.logServiceTracker = new ServiceTracker(context, LOG_SERVICE_NAME,
null);
- this.logServiceTracker.open();
- Logger.setTracker(this.logServiceTracker);
-
// register osgi installer service
final Hashtable<String, String> props = new Hashtable<String,
String>();
props.put(Constants.SERVICE_DESCRIPTION, "Apache Sling Install
Controller Service");
@@ -75,15 +63,6 @@ public class Activator implements Bundle
// stop osgi installer service
if ( this.osgiControllerService != null ) {
this.osgiControllerService.deactivate();
- Logger.logInfo("Waiting for installer thread to stop");
- try {
- this.osgiControllerService.join();
- } catch (InterruptedException e) {
- // we simply ignore this
- }
-
- Logger.logInfo(OsgiInstaller.class.getName()
- + " service deactivated");
this.osgiControllerService = null;
}
// unregister service
@@ -91,11 +70,5 @@ public class Activator implements Bundle
this.osgiControllerServiceReg.unregister();
this.osgiControllerServiceReg = null;
}
- // stop logging
- Logger.setTracker(null);
- if ( this.logServiceTracker != null ) {
- this.logServiceTracker.close();
- this.logServiceTracker = null;
- }
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerContext.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerContext.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerContext.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerContext.java
Fri Sep 10 10:12:34 2010
@@ -25,11 +25,20 @@ package org.apache.sling.osgi.installer.
*/
public interface OsgiInstallerContext {
- /** Schedule a task for execution in the current OsgiController cycle */
+ /**
+ * Schedule a task for execution in the current OsgiController cycle
+ */
void addTaskToCurrentCycle(OsgiInstallerTask t);
- /** Schedule a task for execution in the next OsgiController cycle,
- * usually to indicate that a task must be retried
+ /**
+ * Schedule a task for execution in the next OsgiController cycle,
+ * usually to indicate that a task must be retried
*/
void addTaskToNextCycle(OsgiInstallerTask t);
+
+ /**
+ * Make an entry into the audit log - this should be invoked
+ * by the tasks whenever something has been installed/uninstalled etc.
+ */
+ void log(String message, Object... args);
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerImpl.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerImpl.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerImpl.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerImpl.java
Fri Sep 10 10:12:34 2010
@@ -43,6 +43,8 @@ import org.osgi.framework.BundleEvent;
import org.osgi.framework.BundleListener;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Worker thread where all OSGi tasks are executed.
@@ -57,6 +59,9 @@ public class OsgiInstallerImpl
extends Thread
implements BundleListener, FrameworkListener, OsgiInstaller {
+ /** The logger */
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
/** The bundle context. */
private final BundleContext ctx;
@@ -102,6 +107,14 @@ public class OsgiInstallerImpl
synchronized (newResources) {
newResources.notify();
}
+ logger.debug("Waiting for installer thread to stop");
+ try {
+ this.join();
+ } catch (InterruptedException e) {
+ // we simply ignore this
+ }
+
+ logger.info("Apache Sling OSGi Installer Service stopped.");
}
/**
@@ -116,6 +129,7 @@ public class OsgiInstallerImpl
setName(getClass().getSimpleName());
final File f = ctx.getDataFile("RegisteredResourceList.ser");
persistentList = new PersistentResourceList(f);
+ logger.info("Apache Sling OSGi Installer Service started.");
}
@Override
@@ -129,14 +143,14 @@ public class OsgiInstallerImpl
// No tasks to execute - wait until new resources are
// registered
this.cleanupInstallableResources();
- Logger.logDebug("No tasks to process, going idle");
+ logger.debug("No tasks to process, going idle");
synchronized (newResources) {
try {
newResources.wait();
} catch (InterruptedException ignore) {}
}
- Logger.logDebug("Notified of new resources, back to work");
+ logger.debug("Notified of new resources, back to work");
continue;
}
@@ -180,9 +194,9 @@ public class OsgiInstallerImpl
try {
final RegisteredResource rr =
RegisteredResourceImpl.create(ctx, r, scheme);
createdResources.add(rr);
- Logger.logDebug("Adding new resource " + rr);
+ logger.debug("Adding new resource {}", rr);
} catch (final IOException ioe) {
- Logger.logWarn("Cannot create RegisteredResource (resource
will be ignored):" + r, ioe);
+ logger.warn("Cannot create RegisteredResource (resource
will be ignored):" + r, ioe);
}
}
}
@@ -228,7 +242,7 @@ public class OsgiInstallerImpl
for(final String id : ids) {
final String url = scheme + ':' + id;
// Will mark all resources which have r's URL as
uninstallable
- Logger.logDebug("Adding URL " + url + " to
urlsToRemove");
+ logger.debug("Adding URL {} to urlsToRemove", url);
urlsToRemove.add(url);
}
@@ -255,7 +269,7 @@ public class OsgiInstallerImpl
registeredResources = Collections.emptyList();
}
synchronized (newResources) {
- Logger.logDebug("Registered new resource scheme: " + scheme);
+ logger.debug("Registered new resource scheme: {}", scheme);
newResourcesSchemes.put(scheme, registeredResources);
newResources.notify();
}
@@ -276,7 +290,7 @@ public class OsgiInstallerImpl
// check for new resource providers (schemes)
// if we have new providers we have to sync them with existing
resources
for(final Map.Entry<String, List<RegisteredResource>> entry :
this.newResourcesSchemes.entrySet()) {
- Logger.logDebug("Processing set of new resources with scheme "
+ entry.getKey());
+ logger.debug("Processing set of new resources with scheme {}",
entry.getKey());
// set all previously found resources that are not available
anymore to uninstall
// if they have been installed - remove resources with a
different state
@@ -287,7 +301,7 @@ public class OsgiInstallerImpl
boolean first = true;
for(final RegisteredResource r : group) {
if ( r.getScheme().equals(entry.getKey()) ) {
- Logger.logDebug("Checking " + r);
+ logger.debug("Checking {}", r);
// search if we have a new entry with the same url
boolean found = false;
final Iterator<RegisteredResource> m =
entry.getValue().iterator();
@@ -296,7 +310,7 @@ public class OsgiInstallerImpl
found =
testResource.getURL().equals(r.getURL());
}
if ( !found) {
- Logger.logDebug("Resource " + r + " seems to
be removed.");
+ logger.debug("Resource {} seems to be
removed.", r);
if ( r.getState() ==
RegisteredResource.State.INSTALLED && first ) {
r.setState(RegisteredResource.State.UNINSTALL);
} else {
@@ -310,8 +324,8 @@ public class OsgiInstallerImpl
this.persistentList.remove(rr);
}
}
- Logger.logDebug("Added set of " + entry.getValue().size() + "
new resources with scheme "
- + entry.getKey() + ": " + entry.getValue());
+ logger.debug("Added set of {} new resources with scheme {} :
{}",
+ new Object[] {entry.getValue().size(), entry.getKey(),
entry.getValue()});
newResources.addAll(entry.getValue());
}
@@ -356,11 +370,11 @@ public class OsgiInstallerImpl
break;
}
if ( toActivate != null ) {
- Logger.logDebug("Activating " + toActivate);
+ logger.debug("Activating {}", toActivate);
if ( toActivate.getState() ==
RegisteredResource.State.UNINSTALL && i.hasNext() ) {
final RegisteredResource r = i.next();;
if (r.getState() ==
RegisteredResource.State.IGNORED || r.getState() ==
RegisteredResource.State.INSTALLED) {
- Logger.logDebug("Reactivating for next
cycle " + r);
+ logger.debug("Reactivating for next cycle
{}", r);
r.setState(RegisteredResource.State.INSTALL);
}
}
@@ -428,18 +442,23 @@ public class OsgiInstallerImpl
final OsgiInstallerContext ctx = new OsgiInstallerContext() {
public void addTaskToNextCycle(final OsgiInstallerTask t) {
- Logger.logDebug("adding task to next cycle:" + t);
+ logger.debug("adding task to next cycle: {}", t);
synchronized (tasksForNextCycle) {
tasksForNextCycle.add(t);
}
}
public void addTaskToCurrentCycle(final OsgiInstallerTask t) {
- Logger.logDebug("adding task to current cycle:" + t);
+ logger.debug("adding task to current cycle: {}", t);
synchronized ( tasks ) {
tasks.add(t);
}
}
+
+ public void log(String message, Object... args) {
+ // TODO Auto-generated method stub
+
+ }
};
while (this.active && !tasks.isEmpty()) {
OsgiInstallerTask t = null;
@@ -447,7 +466,7 @@ public class OsgiInstallerImpl
t = tasks.first();
tasks.remove(t);
}
- Logger.logInfo("Executing task " + t);
+ logger.debug("Executing task: {}", t);
t.execute(ctx);
}
}
@@ -468,7 +487,7 @@ public class OsgiInstallerImpl
toRetry = tasksForNextCycle.size();
}
if (toRetry > 0) {
- Logger.logDebug(toRetry + " tasks scheduled for retrying");
+ logger.debug("{} tasks scheduled for retrying", toRetry);
synchronized (newResources) {
retriesScheduled = true;
newResources.notify();
@@ -485,7 +504,7 @@ public class OsgiInstallerImpl
}
final int t = e.getType();
if(t == BundleEvent.INSTALLED || t == BundleEvent.RESOLVED || t ==
BundleEvent.STARTED || t == BundleEvent.UPDATED) {
- Logger.logDebug("Received BundleEvent that might allow installed
bundles to start, scheduling retries if any");
+ logger.debug("Received BundleEvent that might allow installed
bundles to start, scheduling retries if any");
scheduleRetries();
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/OsgiInstallerTask.java
Fri Sep 10 10:12:34 2010
@@ -18,6 +18,9 @@
*/
package org.apache.sling.osgi.installer.impl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Base class for tasks that can be executed by the {...@link
OsgiInstallerImpl}
@@ -26,6 +29,8 @@ public abstract class OsgiInstallerTask
private final RegisteredResource resource;
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
public OsgiInstallerTask(final RegisteredResource r) {
this.resource = r;
}
@@ -37,6 +42,10 @@ public abstract class OsgiInstallerTask
return this.resource;
}
+ public Logger getLogger() {
+ return this.logger;
+ }
+
public abstract void execute(OsgiInstallerContext ctx);
/** Tasks are sorted according to this key */
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/PersistentResourceList.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/PersistentResourceList.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/PersistentResourceList.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/PersistentResourceList.java
Fri Sep 10 10:12:34 2010
@@ -33,12 +33,18 @@ import java.util.Map;
import java.util.SortedSet;
import java.util.TreeSet;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* Persistent list of RegisteredResource, used by installer to
* keep track of all registered resources
*/
public class PersistentResourceList {
+ /** The logger */
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
/**
* Map of registered resource sets.
* The key of the map is the entity id of the registered resource.
@@ -58,9 +64,9 @@ public class PersistentResourceList {
try {
ois = new ObjectInputStream(new FileInputStream(dataFile));
restoredData = (Map<String,
SortedSet<RegisteredResource>>)ois.readObject();
- Logger.logDebug("Restored rsource list: " + restoredData);
+ logger.debug("Restored rsource list: {}", restoredData);
} catch (final Exception e) {
- Logger.logWarn("Unable to restore data, starting with empty
list (" + e.getMessage() + ")", e);
+ logger.warn("Unable to restore data, starting with empty list
(" + e.getMessage() + ")", e);
} finally {
if (ois != null) {
try {
@@ -84,12 +90,12 @@ public class PersistentResourceList {
final ObjectOutputStream oos = new ObjectOutputStream(new
FileOutputStream(dataFile));
try {
oos.writeObject(data);
- Logger.logDebug("Persisted resource list.");
+ logger.debug("Persisted resource list.");
} finally {
oos.close();
}
} catch (final Exception e) {
- Logger.logWarn("Unable to save persistent list: " +
e.getMessage(), e);
+ logger.warn("Unable to save persistent list: " + e.getMessage(),
e);
}
}
@@ -98,7 +104,7 @@ public class PersistentResourceList {
}
public void addOrUpdate(final RegisteredResource r) {
- Logger.logDebug("Adding " + r);
+ logger.debug("Adding: {}", r);
SortedSet<RegisteredResource> t = this.data.get(r.getEntityId());
if (t == null) {
t = new TreeSet<RegisteredResource>();
@@ -110,7 +116,7 @@ public class PersistentResourceList {
boolean first = true;
for(final RegisteredResource rr : t) {
if ( rr.getURL().equals(r.getURL()) ) {
- Logger.logDebug("Cleanup obsolete resource " + rr);
+ logger.debug("Cleanup obsolete resource: {}", rr);
rr.cleanup();
t.remove(rr);
if ( first && rr.equals(r) ) {
@@ -131,10 +137,10 @@ public class PersistentResourceList {
final RegisteredResource r = i.next();
if ( r.getURL().equals(url) ) {
if ( first && r.getState() ==
RegisteredResource.State.INSTALLED ) {
- Logger.logDebug("Marking " + r + " for uninstalling");
+ logger.debug("Marking for uninstalling: {}", r);
r.setState(RegisteredResource.State.UNINSTALL);
} else {
- Logger.logDebug("Removing unused " + r);
+ logger.debug("Removing unused: {}", r);
i.remove();
r.cleanup();
}
@@ -147,7 +153,7 @@ public class PersistentResourceList {
public void remove(final RegisteredResource r) {
final SortedSet<RegisteredResource> group =
this.data.get(r.getEntityId());
if ( group != null ) {
- Logger.logDebug("Removing unused " + r);
+ logger.debug("Removing unused: {}", r);
group.remove(r);
r.cleanup();
}
@@ -173,7 +179,7 @@ public class PersistentResourceList {
changed = true;
entry.getValue().remove(r);
r.cleanup();
- Logger.logDebug("Removing from list, uninstalled: " + r);
+ logger.debug("Removing from list, uninstalled: {}", r);
}
if ( entry.getValue().isEmpty() ) {
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/RegisteredResourceImpl.java
Fri Sep 10 10:12:34 2010
@@ -146,7 +146,6 @@ public class RegisteredResourceImpl
if (resourceType.equals(InstallableResource.TYPE_BUNDLE)) {
try {
this.dataFile = getDataFile(ctx);
- Logger.logDebug("Copying data to local storage " +
this.dataFile);
copyToLocalStorage(is);
setAttributesFromManifest();
final String name =
(String)attributes.get(Constants.BUNDLE_SYMBOLICNAME);
@@ -194,8 +193,6 @@ public class RegisteredResourceImpl
*/
public void cleanup() {
if ( this.dataFile != null && this.dataFile.exists() ) {
- Logger.logDebug("Deleting local storage file "
- + dataFile.getAbsolutePath());
dataFile.delete();
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigInstallTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigInstallTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigInstallTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigInstallTask.java
Fri Sep 10 10:12:34 2010
@@ -23,7 +23,6 @@ import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
import org.osgi.service.cm.Configuration;
@@ -61,7 +60,7 @@ public class ConfigInstallTask extends A
final ConfigurationAdmin ca = this.getConfigurationAdmin();
if (ca == null) {
ctx.addTaskToNextCycle(this);
- Logger.logDebug("ConfigurationAdmin not available, task will be
retried later: " + this);
+ this.getLogger().debug("ConfigurationAdmin not available, task
will be retried later: {}", this);
return;
}
@@ -86,9 +85,8 @@ public class ConfigInstallTask extends A
config = getConfiguration(ca, pid, true);
} else {
if (isSameData(config.getProperties(),
getResource().getDictionary())) {
- Logger.logDebug("Configuration " + config.getPid()
- + " already installed with same data, update
request ignored: "
- + getResource());
+ this.getLogger().debug("Configuration {} already
installed with same data, update request ignored: {}",
+ config.getPid(), getResource());
config = null;
}
}
@@ -99,14 +97,14 @@ public class ConfigInstallTask extends A
}
config.update(dict);
this.getResource().setState(RegisteredResource.State.INSTALLED);
- Logger.logInfo("Configuration " + config.getPid()
+ this.getLogger().debug("Configuration " + config.getPid()
+ " " + (created ? "created" : "updated")
+ " from " + getResource());
} else {
this.getResource().setState(RegisteredResource.State.IGNORED);
}
} catch (Exception e) {
- Logger.logDebug("Exception during installation of config " +
this.getResource() + " : " + e.getMessage() + ". Retrying later.", e);
+ this.getLogger().debug("Exception during installation of config "
+ this.getResource() + " : " + e.getMessage() + ". Retrying later.", e);
ctx.addTaskToNextCycle(this);
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigRemoveTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigRemoveTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigRemoveTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/config/ConfigRemoveTask.java
Fri Sep 10 10:12:34 2010
@@ -18,7 +18,6 @@
*/
package org.apache.sling.osgi.installer.impl.config;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
import org.osgi.service.cm.Configuration;
@@ -51,22 +50,22 @@ public class ConfigRemoveTask extends Ab
final ConfigurationAdmin ca = this.getConfigurationAdmin();
if (ca == null) {
ctx.addTaskToNextCycle(this);
- Logger.logDebug("ConfigurationAdmin not available, task will be
retried later: " + this);
+ this.getLogger().debug("ConfigurationAdmin not available, task
will be retried later: {}", this);
return;
}
try {
final Configuration cfg = getConfiguration(ca, pid, false);
if (cfg == null) {
- Logger.logDebug("Cannot delete config , pid=" + pid + " not
found, ignored (" + getResource() + ")");
+ this.getLogger().debug("Cannot delete config , pid={} not
found, ignored ({})", pid, getResource());
this.getResource().setState(RegisteredResource.State.IGNORED);
} else {
- Logger.logInfo("Deleting config " + pid + " (" + getResource()
+ ")");
+ this.getLogger().debug("Deleting config {} ({})", pid,
getResource());
cfg.delete();
this.getResource().setState(RegisteredResource.State.UNINSTALLED);
}
} catch (Exception e) {
- Logger.logDebug("Exception during removal of config " +
this.getResource() + " : " + e.getMessage() + ". Retrying later.", e);
+ this.getLogger().debug("Exception during removal of config " +
this.getResource() + " : " + e.getMessage() + ". Retrying later.", e);
ctx.addTaskToNextCycle(this);
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleInstallTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleInstallTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleInstallTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleInstallTask.java
Fri Sep 10 10:12:34 2010
@@ -19,7 +19,6 @@
package org.apache.sling.osgi.installer.impl.tasks;
import org.apache.sling.osgi.installer.InstallableResource;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
@@ -65,7 +64,8 @@ public class BundleInstallTask extends O
if (startLevelService != null) {
startLevelService.setBundleStartLevel(b, startLevel);
} else {
- Logger.logWarn("Ignoring start level " + startLevel + "
for bundle " + b + " - start level service not available.");
+ this.getLogger().warn("Ignoring start level {} for bundle
{} - start level service not available.",
+ startLevel, b);
}
}
final Version newVersion = new
Version((String)getResource().getAttributes().get(Constants.BUNDLE_VERSION));
@@ -76,7 +76,7 @@ public class BundleInstallTask extends O
ctx.addTaskToCurrentCycle(new BundleStartTask(getResource(),
b.getBundleId(), this.creator));
} catch (Exception ex) {
// if something goes wrong we simply try it again
- Logger.logDebug("Exception during install of bundle " +
this.getResource() + " : " + ex.getMessage() + ". Retrying later.", ex);
+ this.getLogger().debug("Exception during install of bundle " +
this.getResource() + " : " + ex.getMessage() + ". Retrying later.", ex);
ctx.addTaskToNextCycle(this);
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleRemoveTask.java
Fri Sep 10 10:12:34 2010
@@ -18,7 +18,6 @@
*/
package org.apache.sling.osgi.installer.impl.tasks;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
@@ -62,7 +61,7 @@ public class BundleRemoveTask extends Os
this.getResource().setState(RegisteredResource.State.UNINSTALLED);
ctx.addTaskToCurrentCycle(new
SynchronousRefreshPackagesTask(this.creator));
} catch (final BundleException be) {
- Logger.logDebug("Exception during removal of bundle " +
this.getResource() + " : " + be.getMessage() + ". Retrying later.", be);
+ this.getLogger().debug("Exception during removal of bundle " +
this.getResource() + " : " + be.getMessage() + ". Retrying later.", be);
ctx.addTaskToNextCycle(this);
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleStartTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleStartTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleStartTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleStartTask.java
Fri Sep 10 10:12:34 2010
@@ -20,7 +20,6 @@ package org.apache.sling.osgi.installer.
import java.text.DecimalFormat;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerImpl;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
@@ -70,35 +69,37 @@ public class BundleStartTask extends Osg
}
// this is just a sanity check which should never be reached
if (bundleId == 0) {
- Logger.logDebug("Bundle 0 is the framework bundle, ignoring
request to start it");
+ this.getLogger().debug("Bundle 0 is the framework bundle, ignoring
request to start it");
return;
}
// Do not execute this task if waiting for events
final long eventsCount = OsgiInstallerImpl.getTotalEventsCount();
if (eventsCount < eventsCountForRetrying) {
- Logger.logDebug(this + " is not executable at this time,
counters=" + eventsCountForRetrying + "/" + eventsCount);
+ this.getLogger().debug("Task is not executable at this time,
counters={}/{}",
+ eventsCountForRetrying, eventsCount);
ctx.addTaskToNextCycle(this);
return;
}
final Bundle b = this.creator.getBundleContext().getBundle(bundleId);
if (b == null) {
- Logger.logInfo("Cannot start bundle, id not found: " +
bundleId);
+ this.getLogger().info("Cannot start bundle, id not found:
{}", bundleId);
return;
}
if (b.getState() == Bundle.ACTIVE) {
- Logger.logDebug("Bundle already started, no action taken:" +
bundleId + "/" + b.getSymbolicName());
+ this.getLogger().debug("Bundle already started, no action taken:
{}/{}", bundleId, b.getSymbolicName());
return;
}
// Try to start bundle, and if that doesn't work we'll need to retry
try {
b.start();
- Logger.logInfo("Bundle started (retry count=" + retryCount + ",
bundle ID=" + bundleId + ") " + b.getSymbolicName());
+ this.getLogger().info("Bundle started (retry count={}, bundle
ID={}) : {}",
+ new Object[] {retryCount, bundleId, b.getSymbolicName()});
} catch(BundleException e) {
- Logger.logInfo("Could not start bundle (retry count=" + retryCount
+ ", " + e
- + "), will retry: " + bundleId + "/" +
b.getSymbolicName());
+ this.getLogger().info("Could not start bundle (retry count={},
bundle ID={}) : {}. Reason: {}. Will retry.",
+ new Object[] {retryCount, bundleId, b.getSymbolicName(),
e});
// Do the first retry immediately (in case "something" happenened
right now
// that warrants a retry), but for the next ones wait for at least
one bundle
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleTaskCreator.java
Fri Sep 10 10:12:34 2010
@@ -21,8 +21,6 @@ package org.apache.sling.osgi.installer.
import java.io.IOException;
import java.util.TreeSet;
-import org.apache.sling.osgi.installer.OsgiInstaller;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
import org.osgi.framework.Bundle;
@@ -32,12 +30,17 @@ import org.osgi.framework.Version;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.service.startlevel.StartLevel;
import org.osgi.util.tracker.ServiceTracker;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Task creator for bundles
*/
public class BundleTaskCreator {
+ /** The logger */
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
public static final String ATTR_START =
"sling.osgi.installer.start.bundle";
/** Interface of the package admin */
@@ -92,8 +95,8 @@ public class BundleTaskCreator {
}
try {
this.bundleDigestsStorage.purgeAndSave(installedBundlesSymbolicNames);
- } catch (IOException e) {
- Logger.logWarn(OsgiInstaller.class.getName() + " service failed to
save state.", e);
+ } catch (final IOException e) {
+ logger.warn("Service failed to save state.", e);
}
}
@@ -147,8 +150,7 @@ public class BundleTaskCreator {
if (info != null &&
this.bundleDigestsStorage.getInstalledVersion(symbolicName) != null) {
result = new BundleRemoveTask(toActivate, this);
} else {
- Logger.logInfo("Bundle " + symbolicName
- + " was not installed by this module, not
removed");
+ logger.info("Bundle {} was not installed by this module,
not removed", symbolicName);
result = new ChangeStateTask(toActivate,
RegisteredResource.State.UNINSTALLED);
}
@@ -174,10 +176,10 @@ public class BundleTaskCreator {
final String installedVersion =
this.bundleDigestsStorage.getInstalledVersion(info.symbolicName);
if (info.version.toString().equals(installedVersion)) {
doUpdate = true;
- Logger.logInfo("Bundle " + info.symbolicName + " " +
installedVersion
+ logger.info("Bundle " + info.symbolicName + " " +
installedVersion
+ " was installed by this module,
downgrading to " + newVersion);
} else {
- Logger.logInfo("Bundle " + info.symbolicName + " " +
installedVersion
+ logger.info("Bundle " + info.symbolicName + " " +
installedVersion
+ " was not installed by this module, not
downgraded");
}
} else if (compare == 0 &&
this.isSnapshot(newVersion)) {
@@ -186,14 +188,14 @@ public class BundleTaskCreator {
}
if (doUpdate) {
- Logger.logDebug("Scheduling update of " + toActivate);
+ logger.debug("Scheduling update of {}", toActivate);
if (
Constants.SYSTEM_BUNDLE_SYMBOLICNAME.equals(symbolicName) ) {
result = new SystemBundleUpdateTask(toActivate, this);
} else {
result = new BundleUpdateTask(toActivate, this);
}
} else {
- Logger.logDebug("Nothing to install for " + toActivate +
", same version " + newVersion + " already installed.");
+ logger.debug("Nothing to install for {}, same version {}
already installed.", toActivate, newVersion);
result = new ChangeStateTask(toActivate,
RegisteredResource.State.IGNORED);
}
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleUpdateTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleUpdateTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleUpdateTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/BundleUpdateTask.java
Fri Sep 10 10:12:34 2010
@@ -20,7 +20,6 @@ package org.apache.sling.osgi.installer.
import java.io.InputStream;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
@@ -53,7 +52,7 @@ public class BundleUpdateTask extends Os
final String symbolicName =
(String)getResource().getAttributes().get(Constants.BUNDLE_SYMBOLICNAME);
final Bundle b = this.creator.getMatchingBundle(symbolicName);
if (b == null) {
- Logger.logDebug("Bundle to update (" + symbolicName + ") not
found");
+ this.getLogger().debug("Bundle to update ({}) not found",
symbolicName);
this.getResource().setState(RegisteredResource.State.IGNORED);
return;
}
@@ -71,7 +70,7 @@ public class BundleUpdateTask extends Os
snapshot = this.creator.isSnapshot(newVersion);
if (currentVersion.equals(newVersion) && !snapshot) {
// TODO : Isn't this already checked in the task creator?
- Logger.logDebug("Same version is already installed, and not a
snapshot, ignoring update:" + getResource());
+ this.getLogger().debug("Same version is already installed, and not
a snapshot, ignoring update: {}", getResource());
return;
}
@@ -82,7 +81,7 @@ public class BundleUpdateTask extends Os
if (snapshot) {
final String oldDigest =
this.creator.getBundleDigestStorage().getDigest(symbolicName);
if (getResource().getDigest().equals(oldDigest)) {
- Logger.logDebug("Snapshot digest did not change, ignoring
update:" + getResource());
+ this.getLogger().debug("Snapshot digest did not change,
ignoring update: {}", getResource());
return;
}
}
@@ -107,11 +106,11 @@ public class BundleUpdateTask extends Os
ctx.addTaskToNextCycle(this);
return;
}
- Logger.logWarn("Removing failing tasks - unable to retry: " +
this, e);
+ this.getLogger().warn("Removing failing tasks - unable to retry: "
+ this, e);
return;
}
ctx.addTaskToCurrentCycle(new
SynchronousRefreshPackagesTask(this.creator));
- Logger.logDebug("Bundle updated: " + b.getBundleId() + "/" +
b.getSymbolicName());
+ this.getLogger().debug("Bundle updated: {}/{}", b.getBundleId(),
b.getSymbolicName());
return;
}
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/PersistentBundleInfo.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/PersistentBundleInfo.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/PersistentBundleInfo.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/PersistentBundleInfo.java
Fri Sep 10 10:12:34 2010
@@ -29,7 +29,8 @@ import java.util.List;
import java.util.Properties;
import java.util.TreeSet;
-import org.apache.sling.osgi.installer.impl.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Store the digests and version numbers of installed bundles
@@ -37,6 +38,9 @@ import org.apache.sling.osgi.installer.i
*/
class PersistentBundleInfo {
+ /** The logger */
+ private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
private final Properties digests = new Properties();
private final File dataFile;
private static final String VERSION_PREFIX = "V:";
@@ -47,16 +51,18 @@ class PersistentBundleInfo {
*/
PersistentBundleInfo(final File dataFile) {
this.dataFile = dataFile;
- InputStream is = null;
- try {
- is = new FileInputStream(dataFile);
- digests.load(is);
- Logger.logInfo("Digests restored from data file " +
dataFile.getName());
- } catch(IOException ioe) {
- Logger.logInfo("No digests retrieved, cannot read properties file
" + dataFile.getName());
- } finally {
- if (is != null) {
- try {is.close(); } catch (final IOException ignore) {}
+ if ( this.dataFile.exists() ) {
+ InputStream is = null;
+ try {
+ is = new FileInputStream(dataFile);
+ digests.load(is);
+ logger.debug("Digests restored from data file {}",
dataFile.getName());
+ } catch(IOException ioe) {
+ logger.warn("No digests retrieved, cannot read properties file
{}", dataFile.getName());
+ } finally {
+ if (is != null) {
+ try {is.close(); } catch (final IOException ignore) {}
+ }
}
}
}
@@ -88,7 +94,7 @@ class PersistentBundleInfo {
try {os.close(); } catch (final IOException ignore) {}
}
}
- Logger.logInfo("Stored digests of " + digests.size() + " bundles in
data file " + dataFile.getName());
+ logger.debug("Stored digests of {} bundles in data file {}",
digests.size(), dataFile.getName());
}
/**
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SynchronousRefreshPackagesTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SynchronousRefreshPackagesTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SynchronousRefreshPackagesTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SynchronousRefreshPackagesTask.java
Fri Sep 10 10:12:34 2010
@@ -18,7 +18,6 @@
*/
package org.apache.sling.osgi.installer.impl.tasks;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.osgi.framework.Bundle;
@@ -53,7 +52,7 @@ public class SynchronousRefreshPackagesT
*/
public void frameworkEvent(FrameworkEvent event) {
if (event.getType() == FrameworkEvent.PACKAGES_REFRESHED) {
- Logger.logDebug("FrameworkEvent.PACKAGES_REFRESHED");
+ this.getLogger().debug("FrameworkEvent.PACKAGES_REFRESHED");
packageRefreshEventsCount++;
}
}
@@ -87,7 +86,7 @@ public class SynchronousRefreshPackagesT
if(b.getState() == Bundle.ACTIVE) {
final OsgiInstallerTask t = new BundleStartTask(null,
b.getBundleId(), this.bundleTaskCreator);
ctx.addTaskToCurrentCycle(t);
- Logger.logDebug("Added " + t + " to restart bundle if
needed after refreshing packages");
+ this.getLogger().debug("Added {} to restart bundle if
needed after refreshing packages", t);
}
}
@@ -98,16 +97,14 @@ public class SynchronousRefreshPackagesT
this.getPackageAdmin().refreshPackages(null);
while(true) {
if(System.currentTimeMillis() > timeout) {
- Logger.logWarn("No FrameworkEvent.PACKAGES_REFRESHED event
received within "
- +
MAX_REFRESH_PACKAGES_WAIT_SECONDS
- + " seconds after refresh");
+ this.getLogger().warn("No
FrameworkEvent.PACKAGES_REFRESHED event received within {}"
+ + " seconds after refresh",
MAX_REFRESH_PACKAGES_WAIT_SECONDS);
break;
}
if(packageRefreshEventsCount >= targetEventCount) {
final long delta = System.currentTimeMillis() - start;
- Logger.logDebug("FrameworkEvent.PACKAGES_REFRESHED
received "
- + delta
- + " msec after refreshPackages
call");
+ this.getLogger().debug("FrameworkEvent.PACKAGES_REFRESHED
received {}"
+ + " msec after refreshPackages
call", delta);
break;
}
try {
Modified:
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SystemBundleUpdateTask.java
URL:
http://svn.apache.org/viewvc/sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SystemBundleUpdateTask.java?rev=995732&r1=995731&r2=995732&view=diff
==============================================================================
---
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SystemBundleUpdateTask.java
(original)
+++
sling/trunk/installer/osgi/installer/src/main/java/org/apache/sling/osgi/installer/impl/tasks/SystemBundleUpdateTask.java
Fri Sep 10 10:12:34 2010
@@ -21,7 +21,6 @@ package org.apache.sling.osgi.installer.
import java.io.IOException;
import java.io.InputStream;
-import org.apache.sling.osgi.installer.impl.Logger;
import org.apache.sling.osgi.installer.impl.OsgiInstallerContext;
import org.apache.sling.osgi.installer.impl.OsgiInstallerTask;
import org.apache.sling.osgi.installer.impl.RegisteredResource;
@@ -79,7 +78,7 @@ public class SystemBundleUpdateTask exte
try {
b.update(backgroundIS);
} catch (final BundleException be) {
- Logger.logWarn("Unable to update system bundle", be);
+ getLogger().warn("Unable to update system bundle", be);
} finally {
try {
backgroundIS.close();
@@ -90,7 +89,7 @@ public class SystemBundleUpdateTask exte
t.setDaemon(true);
t.start();
} catch (final IOException e) {
- Logger.logWarn("Removing failing tasks - unable to retry: " +
this, e);
+ this.getLogger().warn("Removing failing tasks - unable to retry: "
+ this, e);
} finally {
if ( is != null ) {
try {