1 23 24 25 package com.sun.appserv.management.ext.logging; 26 27 import java.util.Set ; 28 import java.util.Collections ; 29 import java.util.logging.Level ; 30 import java.util.logging.LogRecord ; 31 32 import javax.management.Notification ; 33 import javax.management.NotificationEmitter ; 34 35 import com.sun.appserv.management.base.ListenerInfo; 36 import com.sun.appserv.management.base.Util; 37 import com.sun.appserv.management.util.misc.GSetUtil; 38 39 40 72 public interface LogRecordEmitter extends NotificationEmitter , ListenerInfo 73 { 74 87 88 public static final String LOG_RECORD_NOTIFICATION_PREFIX = "com.sun.appserv.management.ext.logging.Logging."; 89 90 91 public static final String LOG_RECORD_SEVERE_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.SEVERE; 92 93 94 public static final String LOG_RECORD_WARNING_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.WARNING; 95 96 97 public static final String LOG_RECORD_INFO_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.INFO; 98 99 100 public static final String LOG_RECORD_CONFIG_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.CONFIG; 101 102 103 public static final String LOG_RECORD_FINE_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.FINE; 104 105 106 public static final String LOG_RECORD_FINER_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.FINER; 107 108 109 public static final String LOG_RECORD_FINEST_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + Level.FINEST; 110 111 112 public static final String LOG_RECORD_OTHER_NOTIFICATION_TYPE = LOG_RECORD_NOTIFICATION_PREFIX + "OTHER"; 113 114 public static final Set <String > ALL_LOG_RECORD_NOTIFICATION_TYPES = Collections.unmodifiableSet( 115 GSetUtil.newSet( new String [] 116 { 117 LOG_RECORD_SEVERE_NOTIFICATION_TYPE, 118 LOG_RECORD_WARNING_NOTIFICATION_TYPE, 119 LOG_RECORD_INFO_NOTIFICATION_TYPE, 120 LOG_RECORD_CONFIG_NOTIFICATION_TYPE, 121 LOG_RECORD_FINE_NOTIFICATION_TYPE, 122 LOG_RECORD_FINER_NOTIFICATION_TYPE, 123 LOG_RECORD_FINEST_NOTIFICATION_TYPE, 124 LOG_RECORD_OTHER_NOTIFICATION_TYPE, 125 } )); 126 127 128 131 public static final String LOG_RECORD_KEY_PREFIX = "LogRecord."; 132 133 139 public static final String LOG_RECORD_AS_STRING_KEY = LOG_RECORD_KEY_PREFIX + "toString"; 140 141 142 public static final String LOG_RECORD_LEVEL_KEY = LOG_RECORD_KEY_PREFIX + "Level"; 143 144 145 public static final String LOG_RECORD_LOGGER_NAME_KEY = LOG_RECORD_KEY_PREFIX + "LoggerName"; 146 147 148 public static final String LOG_RECORD_MESSAGE_KEY = LOG_RECORD_KEY_PREFIX + "Message"; 149 150 151 public static final String LOG_RECORD_MILLIS_KEY = LOG_RECORD_KEY_PREFIX + "Millis"; 152 153 154 public static final String LOG_RECORD_SEQUENCE_NUMBER_KEY = LOG_RECORD_KEY_PREFIX + "SequenceNumber"; 155 156 157 public static final String LOG_RECORD_SOURCE_CLASS_NAME_KEY = LOG_RECORD_KEY_PREFIX + "SourceClassName"; 158 159 160 public static final String LOG_RECORD_SOURCE_METHOD_NAME_KEY = LOG_RECORD_KEY_PREFIX + "SourceMethodName"; 161 162 163 public static final String LOG_RECORD_THREAD_ID_KEY = LOG_RECORD_KEY_PREFIX + "ThreadID"; 164 165 173 public static final String LOG_RECORD_THROWN_KEY = LOG_RECORD_KEY_PREFIX + "Thrown"; 174 175 183 public static final String LOG_RECORD_ROOT_CAUSE_KEY = LOG_RECORD_KEY_PREFIX + "ThrownRootCause"; 184 185 190 public int getLogLevelListenerCount( final Level logLevel ); 191 } 192 193 194 195 196 197 | Popular Tags |