[jboss-cvs] JBossAS SVN: r94598 - in projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org: jboss/osgi/common/internal and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 9 09:26:58 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-09 09:26:58 -0400 (Fri, 09 Oct 2009)
New Revision: 94598
Removed:
projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/apache/commons/logging/
projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java
Modified:
projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
Log:
Ignore INFO message of type 'BundleEvent STARTING'
Modified: projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java 2009-10-09 13:26:38 UTC (rev 94597)
+++ projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java 2009-10-09 13:26:58 UTC (rev 94598)
@@ -54,7 +54,7 @@
public Object addingService(ServiceReference reference)
{
LogReaderService logReader = (LogReaderService)super.addingService(reference);
- logReader.addLogListener(new LoggingLogListener());
+ logReader.addLogListener(new LogListenerBridge());
return logReader;
}
};
Deleted: projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java
===================================================================
--- projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java 2009-10-09 13:26:38 UTC (rev 94597)
+++ projects/jboss-osgi/projects/bundles/common/trunk/src/main/java/org/jboss/osgi/common/internal/LoggingLogListener.java 2009-10-09 13:26:58 UTC (rev 94598)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.common.internal;
-
-//$Id$
-
-import org.osgi.framework.Bundle;
-import org.osgi.service.log.LogEntry;
-import org.osgi.service.log.LogListener;
-import org.osgi.service.log.LogService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A LogListener that logs LogEntrys to SLF4J.
- *
- * @author thomas.diesler at jboss.com
- * @since 04-Mar-2009
- */
-public class LoggingLogListener implements LogListener
-{
- public void logged(LogEntry entry)
- {
- Bundle bundle = entry.getBundle();
- int level = entry.getLevel();
- Throwable throwable = entry.getException();
-
- String loggerName = bundle.getSymbolicName();
- Logger log = LoggerFactory.getLogger(loggerName);
-
- if (level == LogService.LOG_DEBUG)
- log.debug(entry.getMessage(), throwable);
-
- else if (level == LogService.LOG_INFO)
- log.info(entry.getMessage(), throwable);
-
- else if (level == LogService.LOG_WARNING)
- log.warn(entry.getMessage(), throwable);
-
- else if (level == LogService.LOG_ERROR)
- log.error(entry.getMessage(), throwable);
- }
-}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list