Methods Summary |
---|
public static java.lang.String[] | getLoggerNames(java.lang.String moduleName)
ArrayList result = new ArrayList();
for (int i=0; i<ModuleAndLoggerTable.length; i++) {
Object[] dim = ModuleAndLoggerTable[i];
String modName = (String)dim[0];
String[] loggerNames = (String[]) dim[1];
if (loggerNames!=null) {
if (moduleName == null) { //we return all AS module loggers in this case
result.addAll(Arrays.asList(loggerNames) );
} else if (moduleName.equals(modName)) {
result.addAll( Arrays.asList(loggerNames) );
break;
}
}
}
String[] lNames = new String[ result.size()];
return (String[])result.toArray(lNames);
|
public static java.lang.String | getMatchedModuleLoggerName(java.lang.String loggerName)
for (int i=0; i<ModuleAndLoggerTable.length; i++) {
Object[] dim = ModuleAndLoggerTable[i];
String[] loggerNames = (String[]) dim[1];
for (int j=0; loggerNames!=null && j<loggerNames.length;j++) {
String name=loggerNames[j];
if (loggerName.startsWith(name) )
return name;
}
}
try {
ServerContext sc = ApplicationServer.getServerContext();
if (sc!=null) {
Config cfg = ServerBeansFactory.getConfigBean(sc.getConfigContext());
ModuleLogLevels allModulesLogLevels = cfg.getLogService().getModuleLogLevels( );
ElementProperty[] elementProperties = allModulesLogLevels.getElementProperty( );
if( elementProperties != null ) {
for( int i = 0; i < elementProperties.length; i++ ) {
String name = elementProperties[i].getName();
if( loggerName.startsWith(name)) {
return name;
}
}
}
}
} catch ( Exception e ) {
new ErrorManager().error( "Error In Setting Initial Loglevel", e,
ErrorManager.GENERIC_FAILURE );
}
return null;
|
public static java.lang.String | getModuleName(java.lang.String loggerName)
for (int i=0; i<ModuleAndLoggerTable.length; i++) {
Object[] dim = ModuleAndLoggerTable[i];
String modName = (String)dim[0];
String[] loggerNames = (String[]) dim[1];
for (int j=0; loggerNames!=null && j<loggerNames.length;j++) {
String name=loggerNames[j];
if (loggerName.equals(name))
return modName;
}
}
return null;
|