I was wondering if there is a way to have a .jar log every file inside it that is uses as it is used. So for example, if you have a .jar that just runs a script to display some image, it would log what it runs until it is exited. I hope this made sense.
This could be what you want. It requires the Java IDE Eclipse.
souvik1997 wrote:
This could be what you want. It requires the Java IDE Eclipse.


I have no idea what that was talking about, all I know is it is talking about running a .jar with a different program. :/
I would use Java.util.logging in each class, and in a static method, just get whatever logger. Then, you can create another class/program that uses the same logger to display the log. So basically, you would LogManager.getLogger(String name), to get a "LOG". Then, in the program that reads it, add a Handler for it. You would basically have something like this in each class:

Code:

static {
    Logger logger = LogManager.getLogger("My.Test.Log");
    logger.log(Level.ALL,"String here");
}

And then the reading program:

Code:

    Logger logger = LogManager.getLogger("My.Test.Log");
    logger.addHandler(new Handler()); // technically, you deal with the abstract messages here.


I hope this works.
Sonlen wrote:
I was wondering if there is a way to have a .jar log every file inside it that is uses as it is used. So for example, if you have a .jar that just runs a script to display some image, it would log what it runs until it is exited. I hope this made sense.


debugger + tracing + profiler should have you covered
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement