jdk/src/share/classes/sun/util/logging/LoggingProxy.java
author ohair
Wed, 13 Apr 2011 16:56:16 -0700
changeset 9050 26c2c1de1631
parent 9014 117374ccf1b7
child 14342 8435a30053c1
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
     2
 * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     4
 *
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
     7
 * published by the Free Software Foundation.  Oracle designates this
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
     8
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
     9
 * by Oracle in the LICENSE file that accompanied this code.
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    10
 *
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    11
 * This code is distributed in the hope that it will be useful, but WITHOUT
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    12
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    13
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    14
 * version 2 for more details (a copy is included in the LICENSE file that
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    15
 * accompanied this code).
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    16
 *
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    17
 * You should have received a copy of the GNU General Public License version
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    18
 * 2 along with this work; if not, write to the Free Software Foundation,
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    19
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    20
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
    21
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
    22
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 4172
diff changeset
    23
 * questions.
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    24
 */
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    25
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    26
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    27
package sun.util.logging;
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    28
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    29
/**
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    30
 * A proxy interface for the java.util.logging support.
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    31
 *
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    32
 * @see sun.util.logging.LoggingSupport
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    33
 */
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    34
public interface LoggingProxy {
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    35
    // Methods to bridge java.util.logging.Logger methods
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    36
    public Object getLogger(String name);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    37
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    38
    public Object getLevel(Object logger);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    39
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    40
    public void setLevel(Object logger, Object newLevel);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    41
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    42
    public boolean isLoggable(Object logger, Object level);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    43
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    44
    public void log(Object logger, Object level, String msg);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    45
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    46
    public void log(Object logger, Object level, String msg, Throwable t);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    47
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    48
    public void log(Object logger, Object level, String msg, Object... params);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    49
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    50
    // Methods to bridge java.util.logging.LoggingMXBean methods
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    51
    public java.util.List<String> getLoggerNames();
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    52
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    53
    public String getLoggerLevel(String loggerName);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    54
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    55
    public void setLoggerLevel(String loggerName, String levelName);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    56
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    57
    public String getParentLoggerName(String loggerName);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    58
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    59
    // Methods to bridge Level.parse() and Level.getName() method
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    60
    public Object parseLevel(String levelName);
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    61
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    62
    public String getLevelName(Object level);
9014
117374ccf1b7 6381464: SimpleFormatter should use one single line format
mchung
parents: 5506
diff changeset
    63
117374ccf1b7 6381464: SimpleFormatter should use one single line format
mchung
parents: 5506
diff changeset
    64
    // return the logging property
117374ccf1b7 6381464: SimpleFormatter should use one single line format
mchung
parents: 5506
diff changeset
    65
    public String getProperty(String key);
4172
bceea7bc12b7 6876135: Add PlatformLoggingMXBean to eliminate the dependency on JMX from logging
mchung
parents:
diff changeset
    66
}