193 symposiums and 30,000 attendees since 2001

Introducing JmxLogger - Real-time Application Log Monitoring

Posted by: Vladimir Vivien on 04/12/2009
For past month, I have been working (on/off) on JmxLogger, a logging API which lets you monitor your Java Logging or Log4J application log events in real-time using JMX. I have had the idea for a while, but decided to finally capture it as project. So, here it is.

http://code.google.com/p/jmx-logger/


JmxLogger
JmxLogger makes it easy to broadcast your Java Logging or your Log4J log events as JMX notifications. As such, you can easily monitor your application's activity logs in real-time. Using familiar logging API and configuration mechanism (i.e. log4j.xml or Java Logging properties file), developers can quickly integrate realtime application log monitoring into their existing deployed code. All it takes is a logging configuration change.

The JmxLogger API provides a Java Logging Handler and a Log4J Appender which can be used to integrate between your favorite logging framework and JMX. JmxLogger hides the complexity of dealing with JMX. You simply configure your logging framework as you normally do, and that's it. You are ready to broadcast your logging events as JMX notification events.

Features

Getting Started

JmxLogger Events

When you log your application events using either Java Logging or Log4J (see project site for more detail), your log events will get routed to the JmxLogger Java Logging Handler or Log4J Appender defined in your application's logging configuration file.

Below you can see a configuration that sends log messages to the Console and a JmxLogger Logging Handler.

Using a command-line Console you can see your log message messages as they are logged in your application.

The same log events are also emitted as JMX notifications. Using JConsole, you can see these events as they are logged in your application in real-time.

That's it! You have seen how JmxLogger can effortlessly integrate JMX and the two standard logging API's available (Java Logging and Log4J).


be the first to rate this blog

About Vladimir Vivien

Vladimir Vivien

Vladimir Vivien is a software engineer living in the United States. Past and current experiences include development in Java and C#.Net for industries including publishing, financial, and healthcare. Vladimir enjoys taking part in open source projects. He is a contributor on Groovy project (he is the creator of JmxBuilder) and author of other project such as JmxLogger (http://code.google.com/p/jmx-logger/). Vladimir runs the Tampa Java User Group (Tampa, FL).

He has a wide range of technology interests including Java, OSGi, Groovy/Grails, JavaFX, SunSPOT, BugLabs, and anything else that runs on the JVM. He thinks the future direction of the Java platform is hidden in languages such as Groovy and Scala.

More About Vladimir »

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Core Java, JEE
  • Groovy, JRuby, Scala, Clojure
  • Hibernate, Grails, Spring, JSF, GWT
  • Ajax, Flex, RIA
  • more...
Learn More »

NFJS, the Magazine

December Issue Now Available
  • Hibernate Performance Tuning, Part 2
    by Scott Leberknight
  • Virtualization for Development
    by Pratik Patel
  • Emergent Design & Evolutionary Architecture
    by Neal Ford
  • Writing Secure Code with ESAPI
    by Ken Sipe
Learn More »