Search in sources :

Example 11 with IllegalLogLevelsEx

use of alma.Logging.IllegalLogLevelsEx in project ACS by ACS-Community.

the class DALImpl method set_default_logLevels.

/**
	 * Sets the log levels of the default logging configuration. These levels
	 * are used by all loggers that have not been configured individually.
	 */
public void set_default_logLevels(LogLevels levels) throws IllegalLogLevelsEx {
    try {
        logConfig.setDefaultMinLogLevel(AcsLogLevelDefinition.fromInteger(levels.minLogLevel));
        logConfig.setDefaultMinLogLevelLocal(AcsLogLevelDefinition.fromInteger(levels.minLogLevelLocal));
    } catch (AcsJIllegalArgumentEx ex) {
        //throw ex.toIllegalArgumentEx();
        IllegalLogLevelsEx ille = new IllegalLogLevelsEx(ex.getErrorDesc());
        throw ille;
    }
}
Also used : IllegalLogLevelsEx(alma.Logging.IllegalLogLevelsEx) AcsJIllegalArgumentEx(alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx)

Example 12 with IllegalLogLevelsEx

use of alma.Logging.IllegalLogLevelsEx in project ACS by ACS-Community.

the class DALImpl 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;
        }
    }
}
Also used : IllegalLogLevelsEx(alma.Logging.IllegalLogLevelsEx) UnnamedLogger(alma.maci.loggingconfig.UnnamedLogger) AcsJIllegalArgumentEx(alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx)

Aggregations

AcsJIllegalArgumentEx (alma.ACSErrTypeCommon.wrappers.AcsJIllegalArgumentEx)12 IllegalLogLevelsEx (alma.Logging.IllegalLogLevelsEx)12 UnnamedLogger (alma.maci.loggingconfig.UnnamedLogger)6 LogConfig (alma.acs.logging.config.LogConfig)2 LockableUnnamedLogger (alma.acs.logging.config.LogConfig.LockableUnnamedLogger)1