use of alma.maci.loggingconfig.UnnamedLogger in project ACS by ACS-Community.
the class AcsAlarmSystem method set_logLevels.
/**
* Sets log levels for a particular named logger. If levels.useDefault is
* true, then the logger will be reset to using default levels; otherwise it
* will use the supplied local and remote levels.
*/
public void set_logLevels(String logger_name, LogLevels levels) throws LoggerDoesNotExistEx, IllegalLogLevelsEx {
if (levels.useDefault) {
logConfig.clearNamedLoggerConfig(logger_name);
} else {
try {
UnnamedLogger config = AcsLogLevelDefinition.createXsdLogLevelsFromIdl(levels);
logConfig.setNamedLoggerConfig(logger_name, config);
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
}
use of alma.maci.loggingconfig.UnnamedLogger in project ACS by ACS-Community.
the class AcsAlarmSystem 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.
* <p>
* For possible convenience, the default levels are returned in addition to
* setting {@link LogLevels#useDefault} to <code>true</code>.
*/
public LogLevels get_logLevels(String logger_name) throws LoggerDoesNotExistEx {
UnnamedLogger xsdLevels = logConfig.getNamedLoggerConfig(logger_name);
boolean useDefault = !logConfig.hasCustomConfig(logger_name);
LogLevels ret = AcsLogLevelDefinition.createIdlLogLevelsFromXsd(useDefault, xsdLevels);
return ret;
}
use of alma.maci.loggingconfig.UnnamedLogger in project ACS by ACS-Community.
the class AcsContainer method set_logLevels.
/**
* Sets log levels for a particular named logger. If levels.useDefault is
* true, then the logger will be reset to using default levels; otherwise it
* will use the supplied local and remote levels.
*/
public void set_logLevels(String logger_name, LogLevels levels) throws LoggerDoesNotExistEx, IllegalLogLevelsEx {
tryToWaitForContainerStart();
if (levels.useDefault) {
logConfig.clearNamedLoggerConfig(logger_name);
} else {
try {
UnnamedLogger config = AcsLogLevelDefinition.createXsdLogLevelsFromIdl(levels);
logConfig.setNamedLoggerConfig(logger_name, config);
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
}
use of alma.maci.loggingconfig.UnnamedLogger in project ACS by ACS-Community.
the class HibernateWDALImpl method set_logLevels.
/**
* Sets log levels for a particular named logger. If levels.useDefault is
* true, then the logger will be reset to using default levels; otherwise it
* will use the supplied local and remote levels.
*/
public void set_logLevels(String logger_name, LogLevels levels) throws LoggerDoesNotExistEx, IllegalLogLevelsEx {
if (levels.useDefault) {
logConfig.clearNamedLoggerConfig(logger_name);
} else {
try {
UnnamedLogger config = AcsLogLevelDefinition.createXsdLogLevelsFromIdl(levels);
logConfig.setNamedLoggerConfig(logger_name, config);
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
}
use of alma.maci.loggingconfig.UnnamedLogger in project ACS by ACS-Community.
the class LaserComponent method set_logLevels.
/**
* Sets log levels for a particular named logger. If levels.useDefault is
* true, then the logger will be reset to using default levels; otherwise it
* will use the supplied local and remote levels.
*/
public void set_logLevels(String logger_name, LogLevels levels) throws LoggerDoesNotExistEx, IllegalLogLevelsEx {
if (levels.useDefault) {
logConfig.clearNamedLoggerConfig(logger_name);
} else {
try {
UnnamedLogger config = AcsLogLevelDefinition.createXsdLogLevelsFromIdl(levels);
logConfig.setNamedLoggerConfig(logger_name, config);
} catch (AcsJIllegalArgumentEx ex) {
//throw ex.toIllegalArgumentEx();
IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
throw ille;
}
}
}
Aggregations