File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[java.util.logging] recording in log file

 
Rafael Afonso
Ranch Hand
Posts: 63
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

I have two classes: One with main() method (caller class) and other not (called class). both record log messages using java.util.loging. Log configuration is done in caller class. I want that log file have messages from caller and called classes. However in log file it is shown only caller messages.
Below, the source codes.
Caller class:

Called class:

In console I get this:

28/07/2004 15:57:58 testalog.launcher.Acao <init>
INFO: Criando ...
28/07/2004 15:57:58 testalog.launcher.LogLauncher execute
INFO: Iniciando ...
28/07/2004 15:57:58 testalog.launcher.Acao execute
INFO: Execute �sWed Jul 28 15:57:58 GMT-03:00 2004
28/07/2004 15:57:58 testalog.launcher.LogLauncher execute
INFO: Terminando ...
28/07/2004 15:58:13 testalog.launcher.Acao <init>
INFO: Criando ...
28/07/2004 15:58:13 testalog.launcher.LogLauncher execute
INFO: Iniciando ...
28/07/2004 15:58:13 testalog.launcher.Acao execute
INFO: Execute �sWed Jul 28 15:58:13 GMT-03:00 2004
28/07/2004 15:58:13 testalog.launcher.LogLauncher execute
INFO: Terminando ...
...

But in log file It is showed:

28/07/2004 15:57:58 testalog.launcher.LogLauncher execute
INFO: Iniciando ...
28/07/2004 15:57:58 testalog.launcher.LogLauncher execute
INFO: Terminando ...
28/07/2004 15:58:13 testalog.launcher.LogLauncher execute
INFO: Iniciando ...
28/07/2004 15:58:13 testalog.launcher.LogLauncher execute
INFO: Terminando ...

To recapitulate: In console it is showed log messages from caller and called classes, but in log file only caller messages was written. What I need is find a way to record all log messages from called classes in log file.
Suggestions?

Thanks,
[ July 28, 2004: Message edited by: Rafael Afonso ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic