<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Usage Example</title><link>https://sourceforge.net/p/extlog/wiki/Usage%2520Example/</link><description>Recent changes to Usage Example</description><atom:link href="https://sourceforge.net/p/extlog/wiki/Usage%20Example/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 04 Dec 2012 16:52:49 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/extlog/wiki/Usage%20Example/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage Usage Example modified by Manfred Wong</title><link>https://sourceforge.net/p/extlog/wiki/Usage%2520Example/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -1,24 +1,45 @@
 It's very easy to use, just like the way you use the original LogService.
+
 
 Step1: import
 
 ~~~~~~
+
 import com.atlanssia.osgi.logservice.LogServiceExt;
+
 ~~~~~~
-
 
 
 Step2: Get the extended service from context in your bundle, and start use:
 
 ~~~~~~
-        ServiceReference ref = context.getServiceReference(LogServiceExt.class.getName());
+    ServiceReference ref = context.getServiceReference(LogServiceExt.class.getName());
         LogServiceExt log = null;
         if (ref != null)
         {
-            log = (LogServiceExt) context.getService(ref);
+             log = (LogServiceExt) context.getService(ref);
+
 
             log.log(LogService.LOG_INFO, "Logged:hello atlanssia!");
+
 
             log.error("Log a exception", new Exception("Im a exception from Atlanssia"));
         }
 ~~~~~~
+
+Step3: Make sure the bundle logservice-x.x.x-SNAPSHOT.jar started before this bundle.
+
+After all, take a look at the log file, it looks as below(with logback):
+
+~~~~~~
+2012-12-05 00:47:36,116 INFO  [FelixStartLevel]com.atlanssia.substruction.kernel.Activator.start(Activator.java:49)-Logged:hello atlanssia!
+2012-12-05 00:47:36,121 ERROR [FelixStartLevel]com.atlanssia.substruction.kernel.Activator.start(Activator.java:51)-Log a exception
+java.lang.Exception: Im a exception from Atlanssia
+	at com.atlanssia.substruction.kernel.Activator.start(Activator.java:51) ~[classes/:na]
+	at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645) ~[felix.jar:na]
+	at org.apache.felix.framework.Felix.activateBundle(Felix.java:1977) ~[felix.jar:na]
+	at org.apache.felix.framework.Felix.startBundle(Felix.java:1895) ~[felix.jar:na]
+	at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191) ~[felix.jar:na]
+	at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295) ~[felix.jar:na]
+	at java.lang.Thread.run(Thread.java:722) ~[na:1.7.0_04]
+~~~~~~
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Manfred Wong</dc:creator><pubDate>Tue, 04 Dec 2012 16:52:49 -0000</pubDate><guid>https://sourceforge.net09113d9401e83233500576e5ed49ce9ebb7ff405</guid></item><item><title>WikiPage Usage Example modified by Manfred Wong</title><link>https://sourceforge.net/p/extlog/wiki/Usage%2520Example/</link><description>It's very easy to use, just like the way you use the original LogService.

Step1: import

~~~~~~
import com.atlanssia.osgi.logservice.LogServiceExt;
~~~~~~



Step2: Get the extended service from context in your bundle, and start use:

~~~~~~
        ServiceReference ref = context.getServiceReference(LogServiceExt.class.getName());
        LogServiceExt log = null;
        if (ref != null)
        {
            log = (LogServiceExt) context.getService(ref);

            log.log(LogService.LOG_INFO, "Logged:hello atlanssia!");

            log.error("Log a exception", new Exception("Im a exception from Atlanssia"));
        }
~~~~~~</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Manfred Wong</dc:creator><pubDate>Tue, 04 Dec 2012 16:26:29 -0000</pubDate><guid>https://sourceforge.netf354791c88961da08acdc2971160d1adfb501dcf</guid></item></channel></rss>