File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes [java.util.logging] recording in log file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "[java.util.logging] recording in log file" Watch "[java.util.logging] recording in log file" New topic
Author

[java.util.logging] recording in log file

Rafael Afonso
Ranch Hand

Joined: Jul 16, 2002
Posts: 63
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 ]

=================================<br /> Rafael U. C. Afonso<br /> <a href="http://www.javafree.com.br" target="_blank" rel="nofollow">www.javafree.com.br</a><br />=================================<br /><i>Where is debug?<br />debug is on the table</i>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: [java.util.logging] recording in log file