SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Sponsored Links

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Lumberjack Logging Package

Contents

  1. Intro
  2. Building
  3. Running an Example
  4. Contact Info

Intro

Lumberjack is a distributed system for logging, allowing several application tiers to communicate logging events through one or many channels. Running in parrallel to the application, LJ allows multiple listeners to process the same event.

It is the grand plan of this project to have a set of logging utilities for Java and C++ that provide robust and powerful features, suitable for commercial applications. Why logging, you might ask? Well, if you have worked on an N-Tier solution of any size, you know that the WORST implemented module is the logging--it seems so silly, so inconsequential. With "real" deadlines looming, doing logging correctly seems a chore. Only after alpha versions have been put into place is logging mentioned as an issue. Only after the beta is done and the product is quickly approaching gold does it become a priority. And then it is a BIG problem.

Can you hear the pain? :-) Consulting on numerous gigs, I ran into the same problem, and everywhere people were patching together solutions. This is my attempt to give back to the community and make this portion of app design easy!

Building

If you are on a Win32 platform, PLEASE READ THE README.WIN32!!

Otherwise, it is pretty simple (i.e. UN*X):

  1. run ./configure (it guesses your JDK by finding the java command in the PATH)
  2. make

There you go!

Running an Example

Currently, the only example of the code is the EventGenerator to CLIMonitor (i.e. the generator generates events, sends them via a PublisherServer, to the command line monitor, which prints the event to the screen). You will need the following:

  1. A built package (see Building)
  2. Four command shells, all with the same CLASSPATH, all in the <LUMBERJACK>/src/java directory. The CLASSPATH should contain the JDK classes and also the FULL PATH of <LUMBERJACK>/src/java.

    E.g. /usr/local/jdk/lib/classes.zip:/home/me/mysrc/stuff/lumberjack/src/java

    or for Windows c:\jdk1.1.8\lib\classes.zip;d:\mystuff\lumberjack\src\java Use the "export" or "sentenv" under UN*X and the "set" command under Windows.

  3. In one of the four command shells, start the rmiregistry.
  4. In the next window, start the PublisherServer with the command: java com.lucide.lumberjack.PublisherServer

You will see:

      PublisherServer bound in registry
      //yourhost/PublisherServer is ready!

        Where "yourhost" equals your machine's IP host name.

5) In the next window, start the EventGenerator with the command:

java com.lucide.lumberjack.EventGenerator //yourhost/PublisherServer

You will see:

      Generated 0 events ...
      Generated 100 events ...
      ...

6) And in the last window, start the CLIMonitor with the command:

java com.lucide.lumberjack.CLIMonitor CLIMonitor //yourhost/PublisherServer

        You will see:
      CLIMonitor is started!
      Begin monitoring ...
          (initializing connection to event feed)
      Sun Mar 05 19:35:43 EST 2000 EventGenerator, type=1000: Generated event #0
      Sun Mar 05 19:35:43 EST 2000 EventGenerator, type=1000: Generated event #1
      Sun Mar 05 19:35:43 EST 2000 EventGenerator, type=1000: Generated event #2
      ...

7) For the ambitious, start another command window, and run yet another CLIMonitor,

and you will see this:

      CLIMonitor is started!
      Begin monitoring ...
          (initializing connection to event feed)
      Sun Mar 05 19:35:44 EST 2000 EventGenerator, type=1000: Generated event #456
      Sun Mar 05 19:35:44 EST 2000 EventGenerator, type=1000: Generated event #457
      Sun Mar 05 19:35:44 EST 2000 EventGenerator, type=1000: Generated event #458
      Sun Mar 05 19:35:44 EST 2000 EventGenerator, type=1000: Generated event #459
      ...

        WELL LOOK AT THAT!  Your multicasting!  Pretty cool, eh?

Contact Info

If you have any questions about this software, or need to report a bug, please contact me.

Matt Luker
Norwood, MA
kostya@redstarhackers.com

TTGOG


Sponsored Links

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.