[GIT] SLF4J: Simple Logging Facade for Java branch master updated. v_1.7.1-7-g8888edb

This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "SLF4J: Simple Logging Facade for Java". The branch, master has been updated via 8888edb033f7f6c36efc84d522fcb84a17a0b863 (commit) via d6205bf3bd83b55c0cb1d6da0edaab093a4eb1f0 (commit) via e701a43563b875c2491addcf6950aa7d1b9ea7aa (commit) via 3e121c2cac6a20edfa16a0c85c328c085a08e129 (commit) via c2f277a5357901e6856bec38a41ecde8c37dce0b (commit) from 3b040e36ff55b7e98fe16e09a4c813d3dab524d6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=8888edb033f7f6c36efc84d522f... http://github.com/ceki/slf4j/commit/8888edb033f7f6c36efc84d522fcb84a17a0b863 commit 8888edb033f7f6c36efc84d522fcb84a17a0b863 Merge: 3e121c2 d6205bf Author: Ceki Gulcu <ceki@qos.ch> Date: Sat Sep 22 01:08:50 2012 -0700 Merge pull request #23 from bircow/master Website: updated broken links on mailinglists archives for Nabble (http://bugzilla.slf4j.org/show_bug.cgi?id=218) http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=d6205bf3bd83b55c0cb1d6da0ed... http://github.com/ceki/slf4j/commit/d6205bf3bd83b55c0cb1d6da0edaab093a4eb1f0 commit d6205bf3bd83b55c0cb1d6da0edaab093a4eb1f0 Merge: e701a43 3e121c2 Author: Libor Jelinek <ljelinek@virtage.com> Date: Fri Sep 21 20:59:40 2012 +0200 Merge remote-tracking branch 'upstream/master' http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=e701a43563b875c2491addcf695... http://github.com/ceki/slf4j/commit/e701a43563b875c2491addcf6950aa7d1b9ea7aa commit e701a43563b875c2491addcf6950aa7d1b9ea7aa Author: Libor Jelinek <ljelinek@virtage.com> Date: Fri Sep 21 17:17:04 2012 +0200 Updated broken links on mailinglists archives on Nabble (http://bugzilla.slf4j.org/show_bug.cgi?id=218) diff --git a/slf4j-site/src/site/pages/mailing-lists.html b/slf4j-site/src/site/pages/mailing-lists.html index 8576db4..b56f736 100644 --- a/slf4j-site/src/site/pages/mailing-lists.html +++ b/slf4j-site/src/site/pages/mailing-lists.html @@ -70,7 +70,8 @@ <br/> <b>Archives:</b> <a href="http://www.qos.ch/pipermail/announce/">Pipermail</a> | - <a href="http://marc.theaimsgroup.com/?l=slf4j-announce">MARC</a> + <a href="http://marc.theaimsgroup.com/?l=slf4j-announce">MARC</a> | + <a href="http://slf4j.42922.n3.nabble.com/Slf4J-announce-f46208.html">Nabble</a> </p> <p>The announcements list is reserved for important SLF4J API related announcements. As such, the traffic on this list is @@ -93,7 +94,7 @@ <a href="http://www.qos.ch/pipermail/slf4j-user/">Pipermail</a> | <a href="http://news.gmane.org/gmane.comp.java.slf4j.user">Gmane</a> | <a href="http://marc.theaimsgroup.com/?l=slf4j-user">MARC</a> | - <a href="http://www.nabble.com/Slf4J---user-f13203.html">Nabble</a> | + <a href="http://slf4j.42922.n3.nabble.com/slf4j-user-f41810.html">Nabble</a> | <a href="http://www.mail-archive.com/user%40slf4j.org/">MailArchive</a> @@ -116,7 +117,7 @@ <a href="http://www.qos.ch/pipermail/slf4j-dev/">Pipermail</a> | <a href="http://news.gmane.org/gmane.comp.java.slf4j.devel">Gmane</a> | <a href="http://marc.theaimsgroup.com/?l=slf4j-dev">MARC</a> | - <a href="http://www.nabble.com/Slf4J---dev-f13200.html">Nabble</a> | + <a href="http://slf4j.42922.n3.nabble.com/slf4j-dev-f41812.html">Nabble</a> | <a href="http://www.mail-archive.com/dev%40slf4j.org/">MailArchive</a> </p> <p> </p> http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=3e121c2cac6a20edfa16a0c85c3... http://github.com/ceki/slf4j/commit/3e121c2cac6a20edfa16a0c85c328c085a08e129 commit 3e121c2cac6a20edfa16a0c85c328c085a08e129 Merge: c2f277a 3b040e3 Author: mbishop <matthew.bishop@elasticpath.com> Date: Thu Sep 20 17:27:55 2012 -0700 Merge remote-tracking branch 'upstream/master' diff --cc osgi-over-slf4j/pom.xml index 0183f4b,788ae3b..201eec4 --- a/osgi-over-slf4j/pom.xml +++ b/osgi-over-slf4j/pom.xml @@@ -3,11 -3,11 +3,11 @@@ <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> - <version>1.6.7-SNAPSHOT</version> + <version>1.7.2-SNAPSHOT</version> </parent> - + <modelVersion>4.0.0</modelVersion> - + <groupId>org.slf4j</groupId> <artifactId>osgi-over-slf4j</artifactId> <packaging>bundle</packaging> @@@ -54,5 -56,5 +54,5 @@@ </configuration> </plugin> </plugins> - </build> -</project> + </build> - </project> ++</project> http://git.qos.ch/gitweb/?p=slf4j.git;a=commit;h=c2f277a5357901e6856bec38a41... http://github.com/ceki/slf4j/commit/c2f277a5357901e6856bec38a41ecde8c37dce0b commit c2f277a5357901e6856bec38a41ecde8c37dce0b Author: mbishop <matthew.bishop@elasticpath.com> Date: Thu Aug 9 11:24:32 2012 -0700 Bugzilla #269. diff --git a/osgi-over-slf4j/pom.xml b/osgi-over-slf4j/pom.xml index dbd7316..0183f4b 100644 --- a/osgi-over-slf4j/pom.xml +++ b/osgi-over-slf4j/pom.xml @@ -1,37 +1,37 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - + <parent> <groupId>org.slf4j</groupId> <artifactId>slf4j-parent</artifactId> <version>1.6.7-SNAPSHOT</version> </parent> - + <modelVersion>4.0.0</modelVersion> - + <groupId>org.slf4j</groupId> <artifactId>osgi-over-slf4j</artifactId> <packaging>bundle</packaging> - <name>OSGi LogService Implemented Over SLF4J</name> - + <name>OSGi LogService implemented over SLF4J</name> + <url>http://www.slf4j.org</url> <description> OSGi LogService implementation over SLF4J </description> - + <dependencies> <dependency> <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> - <version>4.0</version> + <version>4.2.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.osgi</groupId> - <artifactId>org.osgi.compendium</artifactId> - <version>4.0</version> + <artifactId>org.osgi.enterprise</artifactId> + <version>4.2.0</version> <scope>provided</scope> </dependency> - + <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> @@ -40,21 +40,19 @@ </dependency> </dependencies> <build> - <plugins> + <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>0.9.0-incubator-SNAPSHOT</version> + <version>2.3.7</version> <extensions>true</extensions> <configuration> <instructions> <Export-Package>org.osgi.service.log</Export-Package> - <Import-Package>org.slf4j;version=${project.version},*</Import-Package> - <Private-Package>org.slf4j.osgi.logservice.impl</Private-Package> <Bundle-Activator>org.slf4j.osgi.logservice.impl.Activator</Bundle-Activator> </instructions> </configuration> </plugin> </plugins> - </build> -</project> \ No newline at end of file + </build> +</project> \ No newline at end of file diff --git a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/Activator.java b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/Activator.java index 06e31e9..c824f80 100644 --- a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/Activator.java +++ b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/Activator.java @@ -1,8 +1,8 @@ -/* +/* * Copyright (c) 2004-2005 QOS.ch - * + * * All rights reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -12,7 +12,7 @@ * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT @@ -22,7 +22,7 @@ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * + * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization @@ -32,7 +32,7 @@ package org.slf4j.osgi.logservice.impl; -import java.util.Hashtable; +import java.util.Properties; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; @@ -40,38 +40,35 @@ import org.osgi.framework.ServiceFactory; import org.osgi.service.log.LogService; /** - * <code>Activator</code> implements a simple bundle that registers a + * <code>Activator</code> implements a simple bundle that registers a * {@link LogServiceFactory} for the creation of {@link LogService} implementations. **/ public class Activator implements BundleActivator { - /** - * - * Implements <code>BundleActivator.start()</code> to register a + * + * Implements <code>BundleActivator.start()</code> to register a * LogServiceFactory. * * @param bundleContext the framework context for the bundle * @throws Exception */ public void start(BundleContext bundleContext) throws Exception { - Hashtable props = new Hashtable(); + Properties props = new Properties(); props.put("description", "An slf4j implementation."); ServiceFactory factory = new LogServiceFactory(); - bundleContext.registerService(LogService.class.getName(), factory, props); + bundleContext.registerService(LogService.class.getName(), factory, props); } /** - * - * Implements <code>BundleActivator.stop()</code>. - * + * + * Implements <code>BundleActivator.stop()</code>. + * * @param bundleContext the framework context for the bundle * @throws Exception */ public void stop(BundleContext bundleContext) throws Exception { - + // Note: It is not required that we remove the service here, since // the framework will do it automatically anyway. } - - } diff --git a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceFactory.java b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceFactory.java index babba09..66b1051 100644 --- a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceFactory.java +++ b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceFactory.java @@ -1,8 +1,8 @@ -/* +/* * Copyright (c) 2004-2005 QOS.ch - * + * * All rights reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -12,7 +12,7 @@ * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT @@ -22,7 +22,7 @@ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * + * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization @@ -37,21 +37,18 @@ import org.osgi.framework.ServiceFactory; import org.osgi.framework.ServiceRegistration; /** - * <code>LogServiceFactory</code> creates LogService implemenations. + * <code>LogServiceFactory</code> creates LogService implementations. * * @author John Conlon * @version $Rev$, $Date$ */ public class LogServiceFactory implements ServiceFactory { - - /* (non-Javadoc) * @see org.osgi.framework.ServiceFactory#getService(org.osgi.framework.Bundle, org.osgi.framework.ServiceRegistration) */ public Object getService( Bundle bundle, ServiceRegistration arg1 ) { - return new LogServiceImpl(bundle); } @@ -61,8 +58,6 @@ public class LogServiceFactory implements ServiceFactory */ public void ungetService( Bundle bundle, ServiceRegistration arg1, Object arg2 ) { - // Ignore for now - + //nothing to do. } - } diff --git a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java index 9253f08..4765575 100644 --- a/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java +++ b/osgi-over-slf4j/src/main/java/org/slf4j/osgi/logservice/impl/LogServiceImpl.java @@ -1,8 +1,8 @@ -/* +/* * Copyright (c) 2004-2005 QOS.ch - * + * * All rights reserved. - * + * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including @@ -12,7 +12,7 @@ * copyright notice(s) and this permission notice appear in all copies of * the Software and that both the above copyright notice(s) and this * permission notice appear in supporting documentation. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT @@ -22,7 +22,7 @@ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * + * * Except as contained in this notice, the name of a copyright holder * shall not be used in advertising or otherwise to promote the sale, use * or other dealings in this Software without prior written authorization @@ -40,9 +40,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * <code>LogServiceImpl</code> is a simple OSGi LogService implemenation that delegates to a slf4j + * <code>LogServiceImpl</code> is a simple OSGi LogService implementation that delegates to a slf4j * Logger. - * + * * @author John Conlon */ public class LogServiceImpl implements LogService { @@ -53,7 +53,7 @@ public class LogServiceImpl implements LogService { /** * Creates a new instance of LogServiceImpl. - * + * */ public LogServiceImpl(Bundle bundle) { String name = (String) bundle.getHeaders().get( @@ -65,7 +65,7 @@ public class LogServiceImpl implements LogService { /* * (non-Javadoc) - * + * * @see org.osgi.service.log.LogService#log(int, java.lang.String) */ public void log(int level, String message) { @@ -85,12 +85,11 @@ public class LogServiceImpl implements LogService { default: break; } - } /* * (non-Javadoc) - * + * * @see org.osgi.service.log.LogService#log(int, java.lang.String, * java.lang.Throwable) */ @@ -115,12 +114,12 @@ public class LogServiceImpl implements LogService { /* * (non-Javadoc) - * + * * @see org.osgi.service.log.LogService#log(org.osgi.framework.ServiceReference, * int, java.lang.String) */ public void log(ServiceReference sr, int level, String message) { - + switch (level) { case LOG_DEBUG: if(delegate.isDebugEnabled()){ @@ -148,26 +147,27 @@ public class LogServiceImpl implements LogService { } /** - * createMessage. + * Formats the log message to indicate the service sending it, if known. * - * @param sr - * @param message - * @return + * @param sr the ServiceReference sending the message. + * @param message The message to log. + * @return The formatted log message. */ private String createMessage(ServiceReference sr, String message) { - StringBuffer output = new StringBuffer(); + StringBuilder output = new StringBuilder(); if (sr != null) { - output.append('[').append(sr.toString()).append(']') - .append(message); + output.append('[').append(sr.toString()).append(']'); } else { - output.append(UNKNOWN).append(message); + output.append(UNKNOWN); } + output.append(message); + return output.toString(); } /* * (non-Javadoc) - * + * * @see org.osgi.service.log.LogService#log(org.osgi.framework.ServiceReference, * int, java.lang.String, java.lang.Throwable) */ @@ -199,5 +199,4 @@ public class LogServiceImpl implements LogService { break; } } - } diff --git a/pom.xml b/pom.xml index bb7470e..ea576e5 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,7 @@ <module>jcl-over-slf4j</module> <module>log4j-over-slf4j</module> <module>jul-to-slf4j</module> + <module>osgi-over-slf4j</module> <module>integration</module> <module>slf4j-site</module> <module>slf4j-migrator</module> ----------------------------------------------------------------------- Summary of changes: osgi-over-slf4j/pom.xml | 30 ++++++------- .../org/slf4j/osgi/logservice/impl/Activator.java | 33 +++++++-------- .../osgi/logservice/impl/LogServiceFactory.java | 19 +++----- .../slf4j/osgi/logservice/impl/LogServiceImpl.java | 45 ++++++++++---------- pom.xml | 1 + slf4j-site/src/site/pages/mailing-lists.html | 7 ++- 6 files changed, 63 insertions(+), 72 deletions(-) hooks/post-receive -- SLF4J: Simple Logging Facade for Java
participants (1)
-
git-noreply@pixie.qos.ch