* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
-import java.io.IOException;
-import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;
-
+import org.apache.log4j.Logger;
import org.lttng.ust.agent.LTTngAgent;
-public class Hello
-{
+/**
+ * Example application using the LTTng-UST Java JUL agent.
+ *
+ * @author Christian Babeux
+ */
+public class Hello {
+
/* Of course :) */
private static final int answer = 42;
private static LTTngAgent lttngAgent;
- public static void main(String args[]) throws Exception
- {
+ /**
+ * Application start
+ *
+ * @param args
+ * Command-line arguments
+ * @throws Exception
+ */
+ public static void main(String args[]) throws Exception {
BasicConfigurator.configure();
lttngAgent = LTTngAgent.getLTTngAgent();
/* Trigger a tracing event using the JUL Logger created before. */
helloLog.info("Hello World, the answer is " + answer);
- System.out.println("Firing hello delay in 10 seconds...");
+ System.out.println("Firing hello delay in 5 seconds...");
Thread.sleep(5000);
helloLog.info("Hello World delayed...");
+
+ lttngAgent.dispose();
}
}