use of alma.Logging.LoggingConfigurablePackage.LogLevels in project ACS by ACS-Community.
the class DALImpl method get_default_logLevels.
/**
* Gets the log levels of the default logging configuration. These levels
* are used by all loggers that have not been configured individually.
*/
public LogLevels get_default_logLevels() {
LogLevels logLevels = new LogLevels();
logLevels.useDefault = false;
logLevels.minLogLevel = (short) logConfig.getDefaultMinLogLevel().value;
logLevels.minLogLevelLocal = (short) logConfig.getDefaultMinLogLevelLocal().value;
return logLevels;
}
use of alma.Logging.LoggingConfigurablePackage.LogLevels in project ACS by ACS-Community.
the class ManagerProxyImpl method get_logLevels.
/**
* Gets log levels for a particular named logger. If the returned field
* LogLevels.useDefault is true, then the logger uses the default levels,
* see get_default_logLevels(); otherwise the returned local and remote
* levels apply.
*/
public LogLevels get_logLevels(String logger_name) {
pendingRequests.incrementAndGet();
try {
LogConfig logConfig = ClientLogManager.getAcsLogManager().getLogConfig();
UnnamedLogger levels = logConfig.getNamedLoggerConfig(logger_name);
boolean useDefault = !logConfig.hasCustomConfig(logger_name);
LogLevels ret = AcsLogLevelDefinition.createIdlLogLevelsFromXsd(useDefault, levels);
return ret;
} finally {
pendingRequests.decrementAndGet();
}
}
use of alma.Logging.LoggingConfigurablePackage.LogLevels in project ACS by ACS-Community.
the class ManagerProxyImpl method get_default_logLevels.
/* ************************ LoggingConfigurable ************************ */
/**
* Gets the log levels of the default logging configuration. These levels
* are used by all loggers that have not been configured individually.
*/
public LogLevels get_default_logLevels() {
pendingRequests.incrementAndGet();
try {
LogConfig logConfig = ClientLogManager.getAcsLogManager().getLogConfig();
LogLevels logLevels = new LogLevels();
logLevels.useDefault = false;
logLevels.minLogLevel = (short) logConfig.getDefaultMinLogLevel().value;
logLevels.minLogLevelLocal = (short) logConfig.getDefaultMinLogLevelLocal().value;
return logLevels;
} finally {
pendingRequests.decrementAndGet();
}
}
use of alma.Logging.LoggingConfigurablePackage.LogLevels in project ACS by ACS-Community.
the class LaserComponent method get_default_logLevels.
/**
* Gets the log levels of the default logging configuration. These levels
* are used by all loggers that have not been configured individually.
*/
public LogLevels get_default_logLevels() {
LogLevels logLevels = new LogLevels();
logLevels.useDefault = false;
logLevels.minLogLevel = (short) logConfig.getDefaultMinLogLevel().value;
logLevels.minLogLevelLocal = (short) logConfig.getDefaultMinLogLevelLocal().value;
return logLevels;
}
use of alma.Logging.LoggingConfigurablePackage.LogLevels in project ACS by ACS-Community.
the class LogLevelSelectorPanel method refreshAllLoggersPanel.
/**
* This method makes remote calls and should not be called in the event thread!
* @throws AcsJCORBAProblemEx In case of ORB / network failure or if remote process is unresponsive or unreachable.
*/
private void refreshAllLoggersPanel() throws AcsJCORBAProblemEx {
try {
LogLevels defaultLevels = logConf.get_default_logLevels();
int acsLevel = defaultLevels.minLogLevelLocal;
try {
LogTypeHelper logTypeLocal = LogTypeHelper.fromAcsCoreLevel(AcsLogLevelDefinition.fromInteger(acsLevel));
allLocalCB.setSelectedIndex(logTypeLocal.ordinal());
model.setCommonLocalLevel(logTypeLocal);
} catch (AcsJIllegalArgumentEx e) {
logger.warning("Unexpected log level " + acsLevel + " obtained as default minLogLevelLocal.");
}
acsLevel = defaultLevels.minLogLevel;
try {
LogTypeHelper logTypeGlobal = LogTypeHelper.fromAcsCoreLevel(AcsLogLevelDefinition.fromInteger(acsLevel));
allGlobalCB.setSelectedIndex(logTypeGlobal.ordinal());
model.setCommonGlobalLevel(logTypeGlobal);
} catch (AcsJIllegalArgumentEx e) {
logger.warning("Unexpected log level " + acsLevel + " obtained as default minLogLevel.");
}
} catch (SystemException ex) {
AcsJCORBAProblemEx ex2 = new AcsJCORBAProblemEx(ex);
ex2.setInfo("Failed to retrieve logger names or levels.");
throw ex2;
}
}
Aggregations