Java Doc for LoggingMXBean.java in  » 6.0-JDK-Core » Collections-Jar-Zip-Logging-regex » java » util » logging » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » Collections Jar Zip Logging regex » java.util.logging 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.logging.LoggingMXBean

All known Subclasses:   java.util.logging.Logging,
LoggingMXBean
public interface LoggingMXBean (Code)
The management interface for the logging facility.

There is a single global instance of the LoggingMXBean. This instance is an MXBean can be obtained by calling the LogManager.getLoggingMXBean method or from the java.lang.management.ManagementFactory.getPlatformMBeanServerplatform MBeanServer method.

The javax.management.ObjectName ObjectName for uniquely identifying the LoggingMXBean within an MBeanServer is:

LogManager.LOGGING_MXBEAN_NAMEjava.util.logging:type=Logging

See Also:   java.lang.management.ManagementFactory
author:
   Ron Mann
author:
   Mandy Chung
version:
   1.15, 05/05/07
since:
   1.5




Method Summary
public  StringgetLoggerLevel(String loggerName)
     Gets the name of the log level associated with the specified logger. If the specified logger does not exist, null is returned.
public  java.util.List<String>getLoggerNames()
     Returns the list of currently registered loggers.
public  StringgetParentLoggerName(String loggerName)
     Returns the name of the parent for the specified logger. If the specified logger does not exist, null is returned.
public  voidsetLoggerLevel(String loggerName, String levelName)
     Sets the specified logger to the specified new level.



Method Detail
getLoggerLevel
public String getLoggerLevel(String loggerName)(Code)
Gets the name of the log level associated with the specified logger. If the specified logger does not exist, null is returned. This method first finds the logger of the given name and then returns the name of the log level by calling:
Logger.getLevel Logger.getLevel() . Level.getName getName() ;

If the Level of the specified logger is null, which means that this logger's effective level is inherited from its parent, an empty string will be returned.
Parameters:
  loggerName - The name of the Logger to be retrieved. The name of the log level of the specified logger; oran empty string if the log level of the specified loggeris null. If the specified logger does notexist, null is returned.
See Also:   Logger.getLevel




getLoggerNames
public java.util.List<String> getLoggerNames()(Code)
Returns the list of currently registered loggers. This method calls LogManager.getLoggerNames and returns a list of the logger names. A list of String each of which is acurrently registered Logger name.



getParentLoggerName
public String getParentLoggerName(String loggerName)(Code)
Returns the name of the parent for the specified logger. If the specified logger does not exist, null is returned. If the specified logger is the root Logger in the namespace, the result will be an empty string.
Parameters:
  loggerName - The name of a Logger. the name of the nearest existing parent logger;an empty string if the specified logger is the root logger.If the specified logger does not exist, null is returned.



setLoggerLevel
public void setLoggerLevel(String loggerName, String levelName)(Code)
Sets the specified logger to the specified new level. If the levelName is not null, the level of the specified logger is set to the parsed Level matching the levelName. If the levelName is null, the level of the specified logger is set to null and the effective level of the logger is inherited from its nearest ancestor with a specific (non-null) level value.
Parameters:
  loggerName - The name of the Logger to be set.Must be non-null.
Parameters:
  levelName - The name of the level to set the specified logger to, or null if to set the level to inheritfrom its nearest ancestor.
throws:
  IllegalArgumentException - if the specified logger does not exist, or levelName is not a valid level name.
throws:
  SecurityException - if a security manager exists and ifthe caller does not have LoggingPermission("control").
See Also:   Logger.setLevel



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.