• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

logging in SUN AS and JSR047

 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I am using SUN AS 8.1 PE and JDK 1.4 logging.

How can I set logging level for all package ?

I want log messages with FINE level to be written in server.log.

If I add property lv.mypackage with value FINEST in Module Log Level page in SUN AS console then it desn't work. It still writes messages only with INFO level or above in server.log. I have noticed that I need to specify exact class name in the configuration, but I don't want to list all my classes in SUN AS console!

Furthermore it seems that it should work, according to this specification:

http://www.jcp.org/aboutJava/communityprocess/review/jsr047/spec.pdf


Loggers are normally named entities, using dot separated names such as �java.awt�. The
namespace is hierarchical and is managed by the LogManager. The namespace should typically
be aligned with the Java packaging namespace, but is not required to follow it slavishly. For
example, a Logger called �java.awt� might handle logging requests for classes in the java.awt
package, but it might also handle logging for classes in sun.awt that support the client-visible
abstractions defined in the java.awt package.
In addition to named Loggers, it is also possible to create anonymous Loggers that don�t appear
in the shared namespace. See Section 2.14.
By default, loggers send their output to a set of global Handlers managed by the LogManager
infrastructure class (see 2.7 below).
The LogManager class allows log levels to be updated for named loggers. Setting a level for a
given named Logger will also affect all its children. So setting a log level for �javax.swing�
will also affect javax.swing.text� and �javax.swing.table� and �javax.swing.table.header�. The
LogManager keeps track of level settings and when a new named Logger is created it is assigned
the appropriate Level for its point in the naming hierarchy.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic