• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

[java.util.logging] recording in log file

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic