A new way to log with JPDA

Innovation.. is the name of the game.
Before starting Jylogging ...

Jylog is JPDA based logger, follow these steps for using Jylog:  

  • Load the classes in which are to be logged. provide fully qualified path names.
  • Go to source control menu and set the source root.
  • click on any loaded class and go to source control/load source menu item.
  • if any methods are to be logged click on class's name and check the check box that appears below loaded class.
  • now click on any method that is to be logged and click on log method 
    check box.
  • if some field or local variable or any message is to be logged on any 
    point in source code click there and select log points/ add log point from menu.
  • after done select logger/save logs, this file can be used for later executions now
  • now select virtual machine/set main class option and pass fully qualified path name 
    of the class to execute.
  • The output of the program appears in the virtual console below.
    after the program is executed completely save the logs in an xml file.
Inside Jylog

Technical architecture of Jylog can be summarized as under.

VirtualMachineManager is responsible for initiating a (target) virtual machine or listening for one to start remotely. After it starts, all the event requests are set and the virtual machine is activated. Whenever an event occurs event manager selects appropriate listener and the event is passed on to the listener, which in turn uses the logger to log the event.

All the information about which methods or log points are to be logged is maintained by ClassInfoManager, which can serialize or load the information from disk as an XML file.

The Listening and Launching modes:

Jylog works in two modes viz. listening and launching.

  • The launching mode is one in which the application is launched through Jylog, in this case Jylog captures the input and output streams of the application redirects them to the Jylog virtual console.
  • The listening mode is basically for the applications which execute on remote machine or which need some inputs for startup, in this case Jylog should be started in advance and listening mode should be set, it listens on a port, default is 80. when the application starts with particular parameters as specified in JPDA specs. Jylog connects to it and normal execution routine is followed.