diff --git a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.cpp b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.cpp index 9f38012bd..0c1389046 100644 --- a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.cpp +++ b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.cpp @@ -147,6 +147,9 @@ LogControllerConfig::LogControllerConfig(bslma::Allocator* allocator) , d_syslogAppName("") , d_syslogVerbosity(ball::Severity::ERROR) , d_categories(allocator) +, d_recordBufferSize(32768) +, d_recordingVerbosity(ball::Severity::OFF) +, d_triggerVerbosity(ball::Severity::OFF) { // NOTHING } @@ -167,6 +170,9 @@ LogControllerConfig::LogControllerConfig(const LogControllerConfig& other, , d_syslogAppName(other.d_syslogAppName, allocator) , d_syslogVerbosity(other.d_syslogVerbosity) , d_categories(other.d_categories, allocator) +, d_recordBufferSize(other.d_recordBufferSize) +, d_recordingVerbosity(other.d_recordingVerbosity) +, d_triggerVerbosity(other.d_triggerVerbosity) { // NOTHING } @@ -189,6 +195,9 @@ LogControllerConfig::operator=(const LogControllerConfig& rhs) d_syslogAppName = rhs.d_syslogAppName; d_syslogVerbosity = rhs.d_syslogVerbosity; d_categories = rhs.d_categories; + d_recordBufferSize = rhs.d_recordBufferSize; + d_recordingVerbosity = rhs.d_recordingVerbosity; + d_triggerVerbosity = rhs.d_triggerVerbosity; } return *this; @@ -229,169 +238,6 @@ void LogControllerConfig::clearCategoriesProperties() d_categories.clear(); } -int LogControllerConfig::fromDatum(bsl::ostream& errorDescription, - const bdld::Datum& datum) -{ - enum RcEnum { - // Value for the various RC error categories - rc_SUCCESS = 0, - rc_INVALID_DATUM = -1, - rc_INVALID_KEY_TYPE = -2, - rc_INVALID_KEY_VALUE = -3, - rc_UNSET_VALUE = -4, - rc_UNKNOWN_KEY = -5 - }; - - if (!datum.isMap()) { - errorDescription << "The specified datum must be a map"; - return rc_INVALID_DATUM; // RETURN - } - -#define PARSE_ENTRY(ENTRY, FIELD, TYPE, KEY_STR, KEY_PATH) \ - if (bdlb::String::areEqualCaseless(ENTRY.key(), KEY_STR)) { \ - if (!ENTRY.value().is##TYPE()) { \ - errorDescription << "Key '" << #KEY_PATH << "' type must be a " \ - << #TYPE; \ - return rc_INVALID_KEY_TYPE; \ - } \ - FIELD = ENTRY.value().the##TYPE(); \ - continue; \ - } - -#define PARSE_CONF(FIELD, TYPE, KEY_STR) \ - PARSE_ENTRY(entry, FIELD, TYPE, KEY_STR, KEY_STR) - -#define PARSE_SYSLOG(FIELD, TYPE, KEY_STR) \ - PARSE_ENTRY(syslog, FIELD, TYPE, KEY_STR, "syslog/" + KEY_STR) - - double fileMaxAgeDays = -1; - double rotationBytes = -1; - bsl::string loggingVerbosityStr; - bsl::string bslsLogSeverityStr; - bsl::string consoleSeverityStr; - bsl::string syslogVerbosityStr; - - // Iterate over each keys of the datum map.. - for (bsl::size_t i = 0; i < datum.theMap().size(); ++i) { - const bdld::DatumMapEntry& entry = datum.theMap().data()[i]; - PARSE_CONF(d_fileName, String, "fileName"); - PARSE_CONF(fileMaxAgeDays, Double, "fileMaxAgeDays"); - PARSE_CONF(rotationBytes, Double, "rotationBytes"); - PARSE_CONF(d_logfileFormat, String, "logfileFormat"); - PARSE_CONF(d_consoleFormat, String, "consoleFormat"); - PARSE_CONF(loggingVerbosityStr, String, "loggingVerbosity"); - PARSE_CONF(bslsLogSeverityStr, String, "bslsLogSeverityThreshold"); - PARSE_CONF(consoleSeverityStr, String, "consoleSeverityThreshold"); - - if (bdlb::String::areEqualCaseless(entry.key(), "categories")) { - if (!entry.value().isArray()) { - errorDescription << "Key 'categories' must be an array"; - return rc_INVALID_KEY_TYPE; // RETURN - } - bdld::DatumArrayRef array = entry.value().theArray(); - for (bsls::Types::size_type idx = 0; idx < array.length(); ++idx) { - if (!array[idx].isString()) { - errorDescription << "Invalid type for categories[" << idx - << "]: must be a string"; - return rc_INVALID_KEY_TYPE; // RETURN - } - int rc = addCategoryProperties(array[idx].theString()); - if (rc != 0) { - errorDescription << "Invalid string format for categories" - << "[" << idx << "] [rc: " << rc << "]"; - return rc_INVALID_KEY_VALUE; // RETURN - } - } - continue; // CONTINUE - } - - if (bdlb::String::areEqualCaseless(entry.key(), "syslog")) { - if (!entry.value().isMap()) { - errorDescription << "Key 'syslog' must be a map"; - return rc_INVALID_KEY_TYPE; // RETURN - } - - bdld::DatumMapRef syslogConfig = entry.value().theMap(); - for (bsl::size_t j = 0; j < syslogConfig.size(); ++j) { - const bdld::DatumMapEntry& syslog = syslogConfig.data()[j]; - - PARSE_SYSLOG(d_syslogEnabled, Boolean, "enabled"); - PARSE_SYSLOG(d_syslogFormat, String, "logFormat"); - PARSE_SYSLOG(d_syslogAppName, String, "appName"); - PARSE_SYSLOG(syslogVerbosityStr, String, "verbosity"); - - // In a normal workflow should just 'continue' - errorDescription << "Unknown key 'syslog/" << syslog.key() - << "'"; - return rc_UNKNOWN_KEY; // RETURN - } - - continue; // CONTINUE - } - - // In a normal workflow should just 'continue' - errorDescription << "Unknown key '" << entry.key() << "'"; - return rc_UNKNOWN_KEY; // RETURN - } - -#undef PARSE_SYSLOG -#undef PARSE_CONF -#undef PARSE_ENTRY - - if (fileMaxAgeDays <= 0) { - errorDescription << "Unset key 'fileMaxAgeDays'"; - return rc_UNSET_VALUE; // RETURN - } - else { - d_fileMaxAgeDays = static_cast(fileMaxAgeDays); - } - - if (rotationBytes <= 0) { - errorDescription << "Unset key 'rotationBytes'"; - return rc_UNSET_VALUE; // RETURN - } - else { - d_rotationBytes = static_cast(rotationBytes); - } - - if (ball::SeverityUtil::fromAsciiCaseless(&d_loggingVerbosity, - loggingVerbosityStr.c_str()) != - 0) { - errorDescription << "Invalid value for 'loggingVerbosity' ('" - << loggingVerbosityStr << "')"; - return rc_INVALID_KEY_VALUE; // RETURN - } - - ball::Severity::Level bslsSeverityAsBal; - if (ball::SeverityUtil::fromAsciiCaseless(&bslsSeverityAsBal, - bslsLogSeverityStr.c_str()) != - 0) { - errorDescription << "Invalid value for 'bslsLogSeverityThreshold' ('" - << bslsLogSeverityStr << "')"; - return rc_INVALID_KEY_VALUE; // RETURN - } - d_bslsLogSeverityThreshold = LogControllerConfig::balToBslsLogLevel( - bslsSeverityAsBal); - - if (ball::SeverityUtil::fromAsciiCaseless(&d_consoleSeverityThreshold, - consoleSeverityStr.c_str()) != - 0) { - errorDescription << "Invalid value for 'consoleSeverityThreshold' ('" - << consoleSeverityStr << "')"; - return rc_INVALID_KEY_VALUE; // RETURN - } - - if (d_syslogEnabled && ball::SeverityUtil::fromAsciiCaseless( - &d_syslogVerbosity, - syslogVerbosityStr.c_str()) != 0) { - errorDescription << "Invalid value for 'syslog/verbosity' ('" - << syslogVerbosityStr << "')"; - return rc_INVALID_KEY_VALUE; // RETURN - } - - return rc_SUCCESS; -} - // ------------------- // class LogController // ------------------- @@ -642,7 +488,7 @@ int LogController::initialize(bsl::ostream& errorDescription, // ------------- // LoggerManager ball::LoggerManagerConfiguration lmc; - lmc.setLogOrder(ball::LoggerManagerConfiguration::LIFO); + lmc.setLogOrder(ball::LoggerManagerConfiguration::FIFO); lmc.setDefaultThresholdLevelsCallback(bdlf::BindUtil::bind( &ball::LoggerFunctorPayloads::loadParentCategoryThresholdValues, bdlf::PlaceHolders::_1, @@ -651,7 +497,7 @@ int LogController::initialize(bsl::ostream& errorDescription, bdlf::PlaceHolders::_4, bdlf::PlaceHolders::_5, '.')); - rc = lmc.setDefaultRecordBufferSizeIfValid(32768); + rc = lmc.setDefaultRecordBufferSizeIfValid(config.recordBufferSize()); if (rc != 0) { errorDescription << "Unable to set default record buffer size on lmc " << "[rc: " << rc << "]"; @@ -740,7 +586,9 @@ int LogController::initialize(bsl::ostream& errorDescription, // ------------- // Configuration - setVerbosityLevel(config.loggingVerbosity()); + setVerbosityLevel(config.loggingVerbosity(), + config.recordingVerbosity(), + config.triggerVerbosity()); const LogControllerConfig::CategoryPropertiesMap& categories = config.categoriesProperties(); @@ -828,18 +676,20 @@ void LogController::shutdown() d_isInitialized = false; } -void LogController::setVerbosityLevel(ball::Severity::Level verbosity) +void LogController::setVerbosityLevel(ball::Severity::Level passVerbosity, + ball::Severity::Level recordVerbosity, + ball::Severity::Level triggerVerbosity) { ball::Administration::setDefaultThresholdLevels( - ball::Severity::OFF, // recording level - verbosity, // passthrough level - ball::Severity::OFF, // trigger level + recordVerbosity, // recording level + passVerbosity, // passthrough level + triggerVerbosity, // trigger level ball::Severity::OFF); // triggerAll level ball::Administration::setThresholdLevels( "*", - ball::Severity::OFF, // recording level - verbosity, // passthrough level - ball::Severity::OFF, // trigger level + recordVerbosity, // recording level + passVerbosity, // passthrough level + triggerVerbosity, // trigger level ball::Severity::OFF); // triggerAll level } diff --git a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.h b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.h index 1c49ec100..a98410909 100644 --- a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.h +++ b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.h @@ -227,6 +227,20 @@ class LogControllerConfig { CategoryPropertiesMap d_categories; // Map of category properties + int d_recordBufferSize; + // Size in bytes of the logger's record buffer + + ball::Severity::Level d_recordingVerbosity; + // If the severity level of the record is at least as severe as the + // d_recordingVerbosity, then the record will be stored by the logger in + // its log record buffer (i.e., it will be recorded). + + ball::Severity::Level d_triggerVerbosity; + // If the severity of the record is at least as severe as the + // d_triggerVerbosity, then the record will cause immediate publication + // of that record and any records in the logger's log record buffer (i.e., + // this record will trigger a log record dump). + private: /// Convert specified BALL severity `level` to the corresponding /// BSLS_LOG severity level. @@ -269,6 +283,7 @@ class LogControllerConfig { LogControllerConfig& setSyslogEnabled(bool value); LogControllerConfig& setSyslogFormat(const bslstl::StringRef& value); LogControllerConfig& setSyslogAppName(const bslstl::StringRef& value); + LogControllerConfig& setRecordBufferSize(int value); /// Set the corresponding attribute to the specified `value` and return /// a reference offering modifiable access to this object. @@ -283,16 +298,6 @@ class LogControllerConfig { /// Clear the registered list of category properties. void clearCategoriesProperties(); - /// Populate members of this object from the corresponding fields in the - /// specified `datum`. Return 0 on success, or a non-zero return code - /// on error, populating the specified `errorDescription` with a - /// description of the error. Note that in case of error, some of the - /// values from `datum` may have already been applied and so this object - /// might be partially altered. Refer to the component level - /// documentation (section: "LogControllerConfig: Datum format") for the - /// expected format of the `datum`. - int fromDatum(bsl::ostream& errorDescription, const bdld::Datum& datum); - /// Populate members of this object from the corresponding fields in the /// specified `obj` (which should be of a type compatible with one /// generated from a schema as described at the top in the component @@ -316,6 +321,9 @@ class LogControllerConfig { const bsl::string& syslogFormat() const; const bsl::string& syslogAppName() const; ball::Severity::Level syslogVerbosity() const; + int recordBufferSize() const; + ball::Severity::Level recordingVerbosity() const; + ball::Severity::Level triggerVerbosity() const; /// Return the value of the corresponding attribute. const CategoryPropertiesMap& categoriesProperties() const; @@ -456,11 +464,18 @@ class LogController { /// will no longer be available. void shutdown(); - /// Change the logging severity threshold to the specified `verbosity`: - /// any record with a severity of at least `verbosity` will be printed - /// to the log file, and eventually to the console if the configured - /// console severity threshold allows it. - void setVerbosityLevel(ball::Severity::Level verbosity); + /// Change the logging severity threshold to the specified verbosity + /// levels: any record with a severity of at least `passVerbosity` will + /// be printed immediately to the log file, and eventually to the + /// console if the configured console severity threshold allows it. + /// any record with a severity of at least `recordingVerbosity` will be + /// stored by the logger in its log record buffer. Any record with a + /// severity of at least `triggerVerbosity` will cause immediate + /// publication of that record and any records in the logger's buffer. + void setVerbosityLevel( + ball::Severity::Level passVerbosity, + ball::Severity::Level recordVerbosity = ball::Severity::OFF, + ball::Severity::Level triggerVerbosity = ball::Severity::OFF); /// Change the verbosity of the specified `category` to the specified /// `verbosity`. `category` can be an expression, with a terminating @@ -512,7 +527,10 @@ int LogControllerConfig::fromObj(bsl::ostream& errorDescription, .setConsoleFormat(obj.consoleFormat()) .setSyslogEnabled(obj.syslog().enabled()) .setSyslogAppName(obj.syslog().appName()) - .setSyslogFormat(obj.syslog().logFormat()); + .setSyslogFormat(obj.syslog().logFormat()) + .setRecordBufferSize(32768); + // TODO: use obj.logDump() when the config is updated + // .setRecordBufferSize(obj.logDump().recordBufferSize()); if (ball::SeverityUtil::fromAsciiCaseless( &d_loggingVerbosity, @@ -522,6 +540,24 @@ int LogControllerConfig::fromObj(bsl::ostream& errorDescription, return -1; // RETURN } + d_recordingVerbosity = ball::Severity::OFF; + d_triggerVerbosity = ball::Severity::OFF; + // if (ball::SeverityUtil::fromAsciiCaseless( + // &d_recordingVerbosity, + // obj.logDump().recordingLevel().c_str()) != 0) { + // errorDescription << "Invalid value for 'recordingLevel' ('" + // << obj.logDump().recordingLevel() << "')"; + // return -1; // RETURN + // } + + // if (ball::SeverityUtil::fromAsciiCaseless( + // &d_triggerVerbosity, + // obj.logDump().triggerLevel().c_str()) != 0) { + // errorDescription << "Invalid value for 'triggerLevel' ('" + // << obj.logDump().triggerLevel() << "')"; + // return -1; // RETURN + // } + ball::Severity::Level bslsSeverityAsBal = ball::Severity::e_ERROR; // TODO: enforcing 'obj' to have 'bslsLogSeverityThreshold' accessor is a // backward incompatible change from build perspective, and will require a @@ -651,6 +687,12 @@ LogControllerConfig::setSyslogAppName(const bslstl::StringRef& value) return *this; } +inline LogControllerConfig& LogControllerConfig::setRecordBufferSize(int value) +{ + d_recordBufferSize = value; + return *this; +} + inline LogControllerConfig& LogControllerConfig::setSyslogVerbosity(ball::Severity::Level value) { @@ -725,6 +767,21 @@ inline ball::Severity::Level LogControllerConfig::syslogVerbosity() const return d_syslogVerbosity; } +inline int LogControllerConfig::recordBufferSize() const +{ + return d_recordBufferSize; +} + +inline ball::Severity::Level LogControllerConfig::recordingVerbosity() const +{ + return d_recordingVerbosity; +} + +inline ball::Severity::Level LogControllerConfig::triggerVerbosity() const +{ + return d_triggerVerbosity; +} + inline const LogControllerConfig::CategoryPropertiesMap& LogControllerConfig::categoriesProperties() const { diff --git a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.t.cpp b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.t.cpp index 20824e1e1..09caf1440 100644 --- a/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.t.cpp +++ b/src/groups/bmq/bmqtsk/bmqtsk_logcontroller.t.cpp @@ -18,6 +18,9 @@ #include +// MQB +#include + // BDE #include #include @@ -34,7 +37,7 @@ using namespace bsl; // TESTS // ---------------------------------------------------------------------------- -static void test1_logControllerConfigFromDatum() +static void test1_logControllerConfigFromObj() // ------------------------------------------------------------------------ // LOG CONTROLLER CONFIG FROM DATUM // @@ -43,76 +46,64 @@ static void test1_logControllerConfigFromDatum() // - Inner map with SyslogConfig should be processed correctly too. // // Plan: -// 1. Fill the bdld::Datum structure representing LogControllerConfig. -// 2. Initialize the LogControllerConfig with the given bdld::Datum. -// 3. Verify that fromDatum call succeeded. +// 1. Fill the MockObj structure representing LogControllerConfig. +// 2. Initialize the LogControllerConfig with the given MockObj. +// 3. Verify that fromObj call succeeded. // 4. Verify that syslog properties were correctly set. +// 5. Verify that logDump properties were correctly set. // // Testing: -// - LogControllerConfig::fromDatum +// - LogControllerConfig::fromObj // ------------------------------------------------------------------------ { - bmqtst::TestHelper::printTestName("LogControllerConfig::fromDatum Test"); - - bdld::DatumMapBuilder syslogBuilder(s_allocator_p); - syslogBuilder.pushBack("enabled", bdld::Datum::createBoolean(true)); - syslogBuilder.pushBack("appName", - bdld::Datum::createStringRef("testapp", - s_allocator_p)); - syslogBuilder.pushBack( - "logFormat", - bdld::Datum::createStringRef("test %d (%t) %s %F:%l %m\n\n", - s_allocator_p)); - syslogBuilder.pushBack("verbosity", - bdld::Datum::createStringRef("info", - s_allocator_p)); - - bdld::DatumArrayBuilder categoriesBuilder(s_allocator_p); - categoriesBuilder.pushBack( - bdld::Datum::copyString("category:info:red", s_allocator_p)); - - bdld::DatumMapBuilder logControllerBuilder(s_allocator_p); - logControllerBuilder.pushBack("fileName", - bdld::Datum::copyString("fileName", - s_allocator_p)); - logControllerBuilder.pushBack("fileMaxAgeDays", - bdld::Datum::createDouble(8.2)); - logControllerBuilder.pushBack("rotationBytes", - bdld::Datum::createDouble(2048)); - logControllerBuilder.pushBack( - "logfileFormat", - bdld::Datum::copyString("%d (%t) %s %F:%l %m\n\n", s_allocator_p)); - logControllerBuilder.pushBack( - "consoleFormat", - bdld::Datum::copyString("%d (%t) %s %F:%l %m\n\n", s_allocator_p)); - logControllerBuilder.pushBack("loggingVerbosity", - bdld::Datum::copyString("debug", - s_allocator_p)); - logControllerBuilder.pushBack("bslsLogSeverityThreshold", - bdld::Datum::copyString("info", - s_allocator_p)); - logControllerBuilder.pushBack("consoleSeverityThreshold", - bdld::Datum::copyString("info", - s_allocator_p)); - logControllerBuilder.pushBack("categories", categoriesBuilder.commit()); - logControllerBuilder.pushBack("syslog", syslogBuilder.commit()); - - bdld::Datum datum = logControllerBuilder.commit(); + bmqtst::TestHelper::printTestName("LogControllerConfig::fromObj Test"); + mqbcfg::LogController lc(s_allocator_p); + + lc.syslog().enabled() = true; + lc.syslog().appName() = "testapp"; + lc.syslog().logFormat() = "test %d (%t) %s %F:%l %m\n\n"; + lc.syslog().verbosity() = "INFO"; + + lc.categories().push_back("category:info:red"); + // TODO: uncomment when setup of this parameter is uncommented + // lc.logDump().recordBufferSize() = 12345; + // lc.logDump().recordingLevel() = "TRACE"; + // lc.logDump().triggerLevel() = "FATAL"; + + lc.fileName() = "fileName"; + lc.fileMaxAgeDays() = 8; + lc.rotationBytes() = 2048; + lc.logfileFormat() = "%d (%t) %s %F:%l %m\n\n"; + lc.consoleFormat() = "%d (%t) %s %F:%l %m\n\n"; + lc.loggingVerbosity() = "debug"; + // TODO: uncomment when setup of this parameter is uncommented + // lc.bslsLogSeverityThreshold() = "error"; + lc.consoleSeverityThreshold() = "info"; + bmqtsk::LogControllerConfig config(s_allocator_p); bmqu::MemOutStream errorDesc(s_allocator_p); - config.fromDatum(errorDesc, datum); - bdld::Datum::destroy(datum, s_allocator_p); + + ASSERT_EQ(config.fromObj(errorDesc, lc), 0); ASSERT_D(errorDesc.str(), errorDesc.str().empty()); + ASSERT_EQ(config.fileName(), "fileName"); ASSERT_EQ(config.fileMaxAgeDays(), 8); ASSERT_EQ(config.rotationBytes(), 2048); + ASSERT_EQ(config.logfileFormat(), "%d (%t) %s %F:%l %m\n\n"); + ASSERT_EQ(config.consoleFormat(), "%d (%t) %s %F:%l %m\n\n"); ASSERT_EQ(config.loggingVerbosity(), ball::Severity::DEBUG); + ASSERT_EQ(config.bslsLogSeverityThreshold(), bsls::LogSeverity::e_ERROR); + ASSERT_EQ(config.consoleSeverityThreshold(), ball::Severity::INFO); ASSERT_EQ(config.syslogEnabled(), true); ASSERT_EQ(config.syslogFormat(), "test %d (%t) %s %F:%l %m\n\n"); ASSERT_EQ(config.syslogAppName(), "testapp"); ASSERT_EQ(config.syslogVerbosity(), ball::Severity::INFO); + + ASSERT_EQ(config.recordBufferSize(), 32768); + ASSERT_EQ(config.recordingVerbosity(), ball::Severity::OFF); + ASSERT_EQ(config.triggerVerbosity(), ball::Severity::OFF); } // ============================================================================ @@ -125,7 +116,7 @@ int main(int argc, char* argv[]) switch (_testCase) { case 0: - case 1: test1_logControllerConfigFromDatum(); break; + case 1: test1_logControllerConfigFromObj(); break; default: { cerr << "WARNING: CASE '" << _testCase << "' NOT FOUND." << endl; s_testStatus = -1; diff --git a/src/groups/bmq/group/bmq.t.dep b/src/groups/bmq/group/bmq.t.dep index 0ff141920..6e06777fa 100644 --- a/src/groups/bmq/group/bmq.t.dep +++ b/src/groups/bmq/group/bmq.t.dep @@ -1,2 +1,3 @@ benchmark bmq +mqb diff --git a/src/groups/mqb/mqbcfg/mqbcfg.xsd b/src/groups/mqb/mqbcfg/mqbcfg.xsd index c970f6b31..7f88de83a 100644 --- a/src/groups/mqb/mqbcfg/mqbcfg.xsd +++ b/src/groups/mqb/mqbcfg/mqbcfg.xsd @@ -38,6 +38,14 @@ + + + + + + + + @@ -51,6 +59,7 @@ + diff --git a/src/groups/mqb/mqbcfg/mqbcfg_messages.cpp b/src/groups/mqb/mqbcfg/mqbcfg_messages.cpp index 42968e183..ad5ee40cd 100644 --- a/src/groups/mqb/mqbcfg/mqbcfg_messages.cpp +++ b/src/groups/mqb/mqbcfg/mqbcfg_messages.cpp @@ -852,6 +852,153 @@ Heartbeat::print(bsl::ostream& stream, int level, int spacesPerLevel) const return stream; } +// ------------------- +// class LogDumpConfig +// ------------------- + +// CONSTANTS + +const char LogDumpConfig::CLASS_NAME[] = "LogDumpConfig"; + +const int LogDumpConfig::DEFAULT_INITIALIZER_RECORD_BUFFER_SIZE = 32768; + +const char LogDumpConfig::DEFAULT_INITIALIZER_RECORDING_LEVEL[] = "OFF"; + +const char LogDumpConfig::DEFAULT_INITIALIZER_TRIGGER_LEVEL[] = "OFF"; + +const bdlat_AttributeInfo LogDumpConfig::ATTRIBUTE_INFO_ARRAY[] = { + {ATTRIBUTE_ID_RECORD_BUFFER_SIZE, + "recordBufferSize", + sizeof("recordBufferSize") - 1, + "", + bdlat_FormattingMode::e_DEC}, + {ATTRIBUTE_ID_RECORDING_LEVEL, + "recordingLevel", + sizeof("recordingLevel") - 1, + "", + bdlat_FormattingMode::e_TEXT}, + {ATTRIBUTE_ID_TRIGGER_LEVEL, + "triggerLevel", + sizeof("triggerLevel") - 1, + "", + bdlat_FormattingMode::e_TEXT}}; + +// CLASS METHODS + +const bdlat_AttributeInfo* LogDumpConfig::lookupAttributeInfo(const char* name, + int nameLength) +{ + for (int i = 0; i < 3; ++i) { + const bdlat_AttributeInfo& attributeInfo = + LogDumpConfig::ATTRIBUTE_INFO_ARRAY[i]; + + if (nameLength == attributeInfo.d_nameLength && + 0 == bsl::memcmp(attributeInfo.d_name_p, name, nameLength)) { + return &attributeInfo; + } + } + + return 0; +} + +const bdlat_AttributeInfo* LogDumpConfig::lookupAttributeInfo(int id) +{ + switch (id) { + case ATTRIBUTE_ID_RECORD_BUFFER_SIZE: + return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE]; + case ATTRIBUTE_ID_RECORDING_LEVEL: + return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORDING_LEVEL]; + case ATTRIBUTE_ID_TRIGGER_LEVEL: + return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TRIGGER_LEVEL]; + default: return 0; + } +} + +// CREATORS + +LogDumpConfig::LogDumpConfig(bslma::Allocator* basicAllocator) +: d_recordingLevel(DEFAULT_INITIALIZER_RECORDING_LEVEL, basicAllocator) +, d_triggerLevel(DEFAULT_INITIALIZER_TRIGGER_LEVEL, basicAllocator) +, d_recordBufferSize(DEFAULT_INITIALIZER_RECORD_BUFFER_SIZE) +{ +} + +LogDumpConfig::LogDumpConfig(const LogDumpConfig& original, + bslma::Allocator* basicAllocator) +: d_recordingLevel(original.d_recordingLevel, basicAllocator) +, d_triggerLevel(original.d_triggerLevel, basicAllocator) +, d_recordBufferSize(original.d_recordBufferSize){} + +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ + defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) +LogDumpConfig::LogDumpConfig(LogDumpConfig && original) noexcept +: d_recordingLevel(bsl::move(original.d_recordingLevel)), + d_triggerLevel(bsl::move(original.d_triggerLevel)), + d_recordBufferSize(bsl::move(original.d_recordBufferSize)) +{ +} + +LogDumpConfig::LogDumpConfig(LogDumpConfig&& original, + bslma::Allocator* basicAllocator) +: d_recordingLevel(bsl::move(original.d_recordingLevel), basicAllocator) +, d_triggerLevel(bsl::move(original.d_triggerLevel), basicAllocator) +, d_recordBufferSize(bsl::move(original.d_recordBufferSize)) +{ +} +#endif + +LogDumpConfig::~LogDumpConfig() +{ +} + +// MANIPULATORS + +LogDumpConfig& LogDumpConfig::operator=(const LogDumpConfig& rhs) +{ + if (this != &rhs) { + d_recordBufferSize = rhs.d_recordBufferSize; + d_recordingLevel = rhs.d_recordingLevel; + d_triggerLevel = rhs.d_triggerLevel; + } + + return *this; +} + +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ + defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) +LogDumpConfig& LogDumpConfig::operator=(LogDumpConfig&& rhs) +{ + if (this != &rhs) { + d_recordBufferSize = bsl::move(rhs.d_recordBufferSize); + d_recordingLevel = bsl::move(rhs.d_recordingLevel); + d_triggerLevel = bsl::move(rhs.d_triggerLevel); + } + + return *this; +} +#endif + +void LogDumpConfig::reset() +{ + d_recordBufferSize = DEFAULT_INITIALIZER_RECORD_BUFFER_SIZE; + d_recordingLevel = DEFAULT_INITIALIZER_RECORDING_LEVEL; + d_triggerLevel = DEFAULT_INITIALIZER_TRIGGER_LEVEL; +} + +// ACCESSORS + +bsl::ostream& +LogDumpConfig::print(bsl::ostream& stream, int level, int spacesPerLevel) const +{ + bslim::Printer printer(&stream, level, spacesPerLevel); + printer.start(); + printer.printAttribute("recordBufferSize", this->recordBufferSize()); + printer.printAttribute("recordingLevel", this->recordingLevel()); + printer.printAttribute("triggerLevel", this->triggerLevel()); + printer.end(); + return stream; +} + // ------------------------------- // class MasterAssignmentAlgorithm // ------------------------------- @@ -1188,13 +1335,11 @@ Plugins::Plugins(bslma::Allocator* basicAllocator) Plugins::Plugins(const Plugins& original, bslma::Allocator* basicAllocator) : d_libraries(original.d_libraries, basicAllocator) -, d_enabled(original.d_enabled, basicAllocator) -{ -} +, d_enabled(original.d_enabled, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -Plugins::Plugins(Plugins&& original) noexcept +Plugins::Plugins(Plugins && original) noexcept : d_libraries(bsl::move(original.d_libraries)), d_enabled(bsl::move(original.d_enabled)) { @@ -1531,13 +1676,11 @@ ResolvedDomain::ResolvedDomain(bslma::Allocator* basicAllocator) ResolvedDomain::ResolvedDomain(const ResolvedDomain& original, bslma::Allocator* basicAllocator) : d_resolvedName(original.d_resolvedName, basicAllocator) -, d_clusterName(original.d_clusterName, basicAllocator) -{ -} +, d_clusterName(original.d_clusterName, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -ResolvedDomain::ResolvedDomain(ResolvedDomain&& original) noexcept +ResolvedDomain::ResolvedDomain(ResolvedDomain && original) noexcept : d_resolvedName(bsl::move(original.d_resolvedName)), d_clusterName(bsl::move(original.d_clusterName)) { @@ -1692,13 +1835,11 @@ StatsPrinterConfig::StatsPrinterConfig(const StatsPrinterConfig& original, , d_printInterval(original.d_printInterval) , d_maxAgeDays(original.d_maxAgeDays) , d_rotateBytes(original.d_rotateBytes) -, d_rotateDays(original.d_rotateDays) -{ -} +, d_rotateDays(original.d_rotateDays){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -StatsPrinterConfig::StatsPrinterConfig(StatsPrinterConfig&& original) noexcept +StatsPrinterConfig::StatsPrinterConfig(StatsPrinterConfig && original) noexcept : d_file(bsl::move(original.d_file)), d_printInterval(bsl::move(original.d_printInterval)), d_maxAgeDays(bsl::move(original.d_maxAgeDays)), @@ -2059,13 +2200,11 @@ SyslogConfig::SyslogConfig(const SyslogConfig& original, : d_appName(original.d_appName, basicAllocator) , d_logFormat(original.d_logFormat, basicAllocator) , d_verbosity(original.d_verbosity, basicAllocator) -, d_enabled(original.d_enabled) -{ -} +, d_enabled(original.d_enabled){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -SyslogConfig::SyslogConfig(SyslogConfig&& original) noexcept +SyslogConfig::SyslogConfig(SyslogConfig && original) noexcept : d_appName(bsl::move(original.d_appName)), d_logFormat(bsl::move(original.d_logFormat)), d_verbosity(bsl::move(original.d_verbosity)), @@ -2193,14 +2332,12 @@ TcpClusterNodeConnection::TcpClusterNodeConnection( TcpClusterNodeConnection::TcpClusterNodeConnection( const TcpClusterNodeConnection& original, bslma::Allocator* basicAllocator) -: d_endpoint(original.d_endpoint, basicAllocator) -{ -} +: d_endpoint(original.d_endpoint, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -TcpClusterNodeConnection::TcpClusterNodeConnection( - TcpClusterNodeConnection&& original) noexcept +TcpClusterNodeConnection::TcpClusterNodeConnection(TcpClusterNodeConnection && + original) noexcept : d_endpoint(bsl::move(original.d_endpoint)) { } @@ -2319,15 +2456,14 @@ TcpInterfaceListener::TcpInterfaceListener( const TcpInterfaceListener& original, bslma::Allocator* basicAllocator) : d_name(original.d_name, basicAllocator) -, d_port(original.d_port) -{ -} +, d_port(original.d_port){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -TcpInterfaceListener::TcpInterfaceListener(TcpInterfaceListener&& original) - noexcept : d_name(bsl::move(original.d_name)), - d_port(bsl::move(original.d_port)) +TcpInterfaceListener::TcpInterfaceListener(TcpInterfaceListener && + original) noexcept +: d_name(bsl::move(original.d_name)), + d_port(bsl::move(original.d_port)) { } @@ -2454,14 +2590,12 @@ VirtualClusterInformation::VirtualClusterInformation( const VirtualClusterInformation& original, bslma::Allocator* basicAllocator) : d_name(original.d_name, basicAllocator) -, d_selfNodeId(original.d_selfNodeId) -{ -} +, d_selfNodeId(original.d_selfNodeId){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) VirtualClusterInformation::VirtualClusterInformation( - VirtualClusterInformation&& original) noexcept + VirtualClusterInformation && original) noexcept : d_name(bsl::move(original.d_name)), d_selfNodeId(bsl::move(original.d_selfNodeId)) { @@ -2913,6 +3047,11 @@ const bdlat_AttributeInfo LogController::ATTRIBUTE_INFO_ARRAY[] = { "syslog", sizeof("syslog") - 1, "", + bdlat_FormattingMode::e_DEFAULT}, + {ATTRIBUTE_ID_LOG_DUMP, + "logDump", + sizeof("logDump") - 1, + "", bdlat_FormattingMode::e_DEFAULT}}; // CLASS METHODS @@ -2920,7 +3059,7 @@ const bdlat_AttributeInfo LogController::ATTRIBUTE_INFO_ARRAY[] = { const bdlat_AttributeInfo* LogController::lookupAttributeInfo(const char* name, int nameLength) { - for (int i = 0; i < 10; ++i) { + for (int i = 0; i < 11; ++i) { const bdlat_AttributeInfo& attributeInfo = LogController::ATTRIBUTE_INFO_ARRAY[i]; @@ -2958,6 +3097,8 @@ const bdlat_AttributeInfo* LogController::lookupAttributeInfo(int id) return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_CATEGORIES]; case ATTRIBUTE_ID_SYSLOG: return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SYSLOG]; + case ATTRIBUTE_ID_LOG_DUMP: + return &ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOG_DUMP]; default: return 0; } } @@ -2974,6 +3115,7 @@ LogController::LogController(bslma::Allocator* basicAllocator) basicAllocator) , d_consoleSeverityThreshold(basicAllocator) , d_syslog(basicAllocator) +, d_logDump(basicAllocator) , d_fileMaxAgeDays() , d_rotationBytes() { @@ -2991,14 +3133,13 @@ LogController::LogController(const LogController& original, , d_consoleSeverityThreshold(original.d_consoleSeverityThreshold, basicAllocator) , d_syslog(original.d_syslog, basicAllocator) +, d_logDump(original.d_logDump, basicAllocator) , d_fileMaxAgeDays(original.d_fileMaxAgeDays) -, d_rotationBytes(original.d_rotationBytes) -{ -} +, d_rotationBytes(original.d_rotationBytes){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -LogController::LogController(LogController&& original) noexcept +LogController::LogController(LogController && original) noexcept : d_categories(bsl::move(original.d_categories)), d_fileName(bsl::move(original.d_fileName)), d_logfileFormat(bsl::move(original.d_logfileFormat)), @@ -3007,6 +3148,7 @@ LogController::LogController(LogController&& original) noexcept d_bslsLogSeverityThreshold(bsl::move(original.d_bslsLogSeverityThreshold)), d_consoleSeverityThreshold(bsl::move(original.d_consoleSeverityThreshold)), d_syslog(bsl::move(original.d_syslog)), + d_logDump(bsl::move(original.d_logDump)), d_fileMaxAgeDays(bsl::move(original.d_fileMaxAgeDays)), d_rotationBytes(bsl::move(original.d_rotationBytes)) { @@ -3024,6 +3166,7 @@ LogController::LogController(LogController&& original, , d_consoleSeverityThreshold(bsl::move(original.d_consoleSeverityThreshold), basicAllocator) , d_syslog(bsl::move(original.d_syslog), basicAllocator) +, d_logDump(bsl::move(original.d_logDump), basicAllocator) , d_fileMaxAgeDays(bsl::move(original.d_fileMaxAgeDays)) , d_rotationBytes(bsl::move(original.d_rotationBytes)) { @@ -3049,6 +3192,7 @@ LogController& LogController::operator=(const LogController& rhs) d_consoleSeverityThreshold = rhs.d_consoleSeverityThreshold; d_categories = rhs.d_categories; d_syslog = rhs.d_syslog; + d_logDump = rhs.d_logDump; } return *this; @@ -3069,6 +3213,7 @@ LogController& LogController::operator=(LogController&& rhs) d_consoleSeverityThreshold = bsl::move(rhs.d_consoleSeverityThreshold); d_categories = bsl::move(rhs.d_categories); d_syslog = bsl::move(rhs.d_syslog); + d_logDump = bsl::move(rhs.d_logDump); } return *this; @@ -3088,6 +3233,7 @@ void LogController::reset() bdlat_ValueTypeFunctions::reset(&d_consoleSeverityThreshold); bdlat_ValueTypeFunctions::reset(&d_categories); bdlat_ValueTypeFunctions::reset(&d_syslog); + bdlat_ValueTypeFunctions::reset(&d_logDump); } // ACCESSORS @@ -3109,6 +3255,7 @@ LogController::print(bsl::ostream& stream, int level, int spacesPerLevel) const this->consoleSeverityThreshold()); printer.printAttribute("categories", this->categories()); printer.printAttribute("syslog", this->syslog()); + printer.printAttribute("logDump", this->logDump()); printer.end(); return stream; } @@ -3260,13 +3407,11 @@ PartitionConfig::PartitionConfig(const PartitionConfig& original, , d_maxArchivedFileSets(original.d_maxArchivedFileSets) , d_preallocate(original.d_preallocate) , d_prefaultPages(original.d_prefaultPages) -, d_flushAtShutdown(original.d_flushAtShutdown) -{ -} +, d_flushAtShutdown(original.d_flushAtShutdown){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -PartitionConfig::PartitionConfig(PartitionConfig&& original) noexcept +PartitionConfig::PartitionConfig(PartitionConfig && original) noexcept : d_maxDataFileSize(bsl::move(original.d_maxDataFileSize)), d_maxJournalFileSize(bsl::move(original.d_maxJournalFileSize)), d_maxQlistFileSize(bsl::move(original.d_maxQlistFileSize)), @@ -3462,14 +3607,12 @@ StatPluginConfigPrometheus::StatPluginConfigPrometheus( bslma::Allocator* basicAllocator) : d_host(original.d_host, basicAllocator) , d_port(original.d_port) -, d_mode(original.d_mode) -{ -} +, d_mode(original.d_mode){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) StatPluginConfigPrometheus::StatPluginConfigPrometheus( - StatPluginConfigPrometheus&& original) noexcept + StatPluginConfigPrometheus && original) noexcept : d_host(bsl::move(original.d_host)), d_port(bsl::move(original.d_port)), d_mode(bsl::move(original.d_mode)) @@ -3681,13 +3824,11 @@ TcpInterfaceConfig::TcpInterfaceConfig(const TcpInterfaceConfig& original, , d_port(original.d_port) , d_ioThreads(original.d_ioThreads) , d_maxConnections(original.d_maxConnections) -, d_heartbeatIntervalMs(original.d_heartbeatIntervalMs) -{ -} +, d_heartbeatIntervalMs(original.d_heartbeatIntervalMs){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -TcpInterfaceConfig::TcpInterfaceConfig(TcpInterfaceConfig&& original) noexcept +TcpInterfaceConfig::TcpInterfaceConfig(TcpInterfaceConfig && original) noexcept : d_lowWatermark(bsl::move(original.d_lowWatermark)), d_highWatermark(bsl::move(original.d_highWatermark)), d_nodeLowWatermark(bsl::move(original.d_nodeLowWatermark)), @@ -3871,13 +4012,11 @@ ClusterNode::ClusterNode(const ClusterNode& original, : d_name(original.d_name, basicAllocator) , d_dataCenter(original.d_dataCenter, basicAllocator) , d_transport(original.d_transport, basicAllocator) -, d_id(original.d_id) -{ -} +, d_id(original.d_id){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -ClusterNode::ClusterNode(ClusterNode&& original) noexcept +ClusterNode::ClusterNode(ClusterNode && original) noexcept : d_name(bsl::move(original.d_name)), d_dataCenter(bsl::move(original.d_dataCenter)), d_transport(bsl::move(original.d_transport)), @@ -4100,13 +4239,11 @@ NetworkInterfaces::NetworkInterfaces(bslma::Allocator* basicAllocator) NetworkInterfaces::NetworkInterfaces(const NetworkInterfaces& original, bslma::Allocator* basicAllocator) : d_tcpInterface(original.d_tcpInterface, basicAllocator) -, d_heartbeats(original.d_heartbeats) -{ -} +, d_heartbeats(original.d_heartbeats){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -NetworkInterfaces::NetworkInterfaces(NetworkInterfaces&& original) noexcept +NetworkInterfaces::NetworkInterfaces(NetworkInterfaces && original) noexcept : d_tcpInterface(bsl::move(original.d_tcpInterface)), d_heartbeats(bsl::move(original.d_heartbeats)) { @@ -4233,14 +4370,12 @@ ReversedClusterConnection::ReversedClusterConnection( const ReversedClusterConnection& original, bslma::Allocator* basicAllocator) : d_connections(original.d_connections, basicAllocator) -, d_name(original.d_name, basicAllocator) -{ -} +, d_name(original.d_name, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) ReversedClusterConnection::ReversedClusterConnection( - ReversedClusterConnection&& original) noexcept + ReversedClusterConnection && original) noexcept : d_connections(bsl::move(original.d_connections)), d_name(bsl::move(original.d_name)) { @@ -4442,13 +4577,11 @@ StatPluginConfig::StatPluginConfig(const StatPluginConfig& original, , d_queueSize(original.d_queueSize) , d_queueHighWatermark(original.d_queueHighWatermark) , d_queueLowWatermark(original.d_queueLowWatermark) -, d_publishInterval(original.d_publishInterval) -{ -} +, d_publishInterval(original.d_publishInterval){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -StatPluginConfig::StatPluginConfig(StatPluginConfig&& original) noexcept +StatPluginConfig::StatPluginConfig(StatPluginConfig && original) noexcept : d_hosts(bsl::move(original.d_hosts)), d_name(bsl::move(original.d_name)), d_namespacePrefix(bsl::move(original.d_namespacePrefix)), @@ -4623,13 +4756,11 @@ TaskConfig::TaskConfig(const TaskConfig& original, bslma::Allocator* basicAllocator) : d_allocationLimit(original.d_allocationLimit) , d_logController(original.d_logController, basicAllocator) -, d_allocatorType(original.d_allocatorType) -{ -} +, d_allocatorType(original.d_allocatorType){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -TaskConfig::TaskConfig(TaskConfig&& original) noexcept +TaskConfig::TaskConfig(TaskConfig && original) noexcept : d_allocationLimit(bsl::move(original.d_allocationLimit)), d_logController(bsl::move(original.d_logController)), d_allocatorType(bsl::move(original.d_allocatorType)) @@ -4818,13 +4949,11 @@ ClusterDefinition::ClusterDefinition(const ClusterDefinition& original, , d_elector(original.d_elector) , d_clusterMonitorConfig(original.d_clusterMonitorConfig) , d_masterAssignment(original.d_masterAssignment) -, d_clusterAttributes(original.d_clusterAttributes) -{ -} +, d_clusterAttributes(original.d_clusterAttributes){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -ClusterDefinition::ClusterDefinition(ClusterDefinition&& original) noexcept +ClusterDefinition::ClusterDefinition(ClusterDefinition && original) noexcept : d_nodes(bsl::move(original.d_nodes)), d_name(bsl::move(original.d_name)), d_queueOperations(bsl::move(original.d_queueOperations)), @@ -5019,14 +5148,12 @@ ClusterProxyDefinition::ClusterProxyDefinition( , d_name(original.d_name, basicAllocator) , d_queueOperations(original.d_queueOperations) , d_messageThrottleConfig(original.d_messageThrottleConfig) -, d_clusterMonitorConfig(original.d_clusterMonitorConfig) -{ -} +, d_clusterMonitorConfig(original.d_clusterMonitorConfig){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -ClusterProxyDefinition::ClusterProxyDefinition( - ClusterProxyDefinition&& original) noexcept +ClusterProxyDefinition::ClusterProxyDefinition(ClusterProxyDefinition && + original) noexcept : d_nodes(bsl::move(original.d_nodes)), d_name(bsl::move(original.d_name)), d_queueOperations(bsl::move(original.d_queueOperations)), @@ -5183,13 +5310,11 @@ StatsConfig::StatsConfig(const StatsConfig& original, bslma::Allocator* basicAllocator) : d_plugins(original.d_plugins, basicAllocator) , d_printer(original.d_printer, basicAllocator) -, d_snapshotInterval(original.d_snapshotInterval) -{ -} +, d_snapshotInterval(original.d_snapshotInterval){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -StatsConfig::StatsConfig(StatsConfig&& original) noexcept +StatsConfig::StatsConfig(StatsConfig && original) noexcept : d_plugins(bsl::move(original.d_plugins)), d_printer(bsl::move(original.d_printer)), d_snapshotInterval(bsl::move(original.d_snapshotInterval)) @@ -5480,13 +5605,11 @@ AppConfig::AppConfig(const AppConfig& original, , d_routeCommandTimeoutMs(original.d_routeCommandTimeoutMs) , d_isRunningOnDev(original.d_isRunningOnDev) , d_configureStream(original.d_configureStream) -, d_advertiseSubscriptions(original.d_advertiseSubscriptions) -{ -} +, d_advertiseSubscriptions(original.d_advertiseSubscriptions){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -AppConfig::AppConfig(AppConfig&& original) noexcept +AppConfig::AppConfig(AppConfig && original) noexcept : d_brokerInstanceName(bsl::move(original.d_brokerInstanceName)), d_etcDir(bsl::move(original.d_etcDir)), d_hostName(bsl::move(original.d_hostName)), @@ -5743,13 +5866,11 @@ ClustersDefinition::ClustersDefinition(const ClustersDefinition& original, , d_reversedClusterConnections(original.d_reversedClusterConnections, basicAllocator) , d_proxyClusters(original.d_proxyClusters, basicAllocator) -, d_myClusters(original.d_myClusters, basicAllocator) -{ -} +, d_myClusters(original.d_myClusters, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -ClustersDefinition::ClustersDefinition(ClustersDefinition&& original) noexcept +ClustersDefinition::ClustersDefinition(ClustersDefinition && original) noexcept : d_myReverseClusters(bsl::move(original.d_myReverseClusters)), d_myVirtualClusters(bsl::move(original.d_myVirtualClusters)), d_reversedClusterConnections( @@ -5896,13 +6017,11 @@ Configuration::Configuration(bslma::Allocator* basicAllocator) Configuration::Configuration(const Configuration& original, bslma::Allocator* basicAllocator) : d_taskConfig(original.d_taskConfig, basicAllocator) -, d_appConfig(original.d_appConfig, basicAllocator) -{ -} +, d_appConfig(original.d_appConfig, basicAllocator){} #if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) -Configuration::Configuration(Configuration&& original) noexcept +Configuration::Configuration(Configuration && original) noexcept : d_taskConfig(bsl::move(original.d_taskConfig)), d_appConfig(bsl::move(original.d_appConfig)) { @@ -5967,6 +6086,13 @@ Configuration::print(bsl::ostream& stream, int level, int spacesPerLevel) const } // close package namespace } // close enterprise namespace -// GENERATED BY BLP_BAS_CODEGEN_2024.07.18 +// GENERATED BY BLP_BAS_CODEGEN_2024.10.17 // USING bas_codegen.pl -m msg --noAggregateConversion --noExternalization // --noIdent --package mqbcfg --msgComponent messages mqbcfg.xsd +// ---------------------------------------------------------------------------- +// NOTICE: +// Copyright 2024 Bloomberg Finance L.P. All rights reserved. +// Property of Bloomberg Finance L.P. (BFLP) +// This software is made available solely pursuant to the +// terms of a BFLP license agreement which governs its use. +// ------------------------------- END-OF-FILE -------------------------------- diff --git a/src/groups/mqb/mqbcfg/mqbcfg_messages.h b/src/groups/mqb/mqbcfg/mqbcfg_messages.h index 99d95c47e..69918e232 100644 --- a/src/groups/mqb/mqbcfg/mqbcfg_messages.h +++ b/src/groups/mqb/mqbcfg/mqbcfg_messages.h @@ -74,6 +74,9 @@ namespace mqbcfg { class Heartbeat; } namespace mqbcfg { +class LogDumpConfig; +} +namespace mqbcfg { class MessagePropertiesV2; } namespace mqbcfg { @@ -1658,6 +1661,249 @@ BDLAT_DECL_SEQUENCE_WITH_BITWISEMOVEABLE_TRAITS(mqbcfg::Heartbeat) namespace mqbcfg { +// =================== +// class LogDumpConfig +// =================== + +class LogDumpConfig { + // INSTANCE DATA + bsl::string d_recordingLevel; + bsl::string d_triggerLevel; + int d_recordBufferSize; + + // PRIVATE ACCESSORS + template + void hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const; + + public: + // TYPES + enum { + ATTRIBUTE_ID_RECORD_BUFFER_SIZE = 0, + ATTRIBUTE_ID_RECORDING_LEVEL = 1, + ATTRIBUTE_ID_TRIGGER_LEVEL = 2 + }; + + enum { NUM_ATTRIBUTES = 3 }; + + enum { + ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE = 0, + ATTRIBUTE_INDEX_RECORDING_LEVEL = 1, + ATTRIBUTE_INDEX_TRIGGER_LEVEL = 2 + }; + + // CONSTANTS + static const char CLASS_NAME[]; + + static const int DEFAULT_INITIALIZER_RECORD_BUFFER_SIZE; + + static const char DEFAULT_INITIALIZER_RECORDING_LEVEL[]; + + static const char DEFAULT_INITIALIZER_TRIGGER_LEVEL[]; + + static const bdlat_AttributeInfo ATTRIBUTE_INFO_ARRAY[]; + + public: + // CLASS METHODS + static const bdlat_AttributeInfo* lookupAttributeInfo(int id); + // Return attribute information for the attribute indicated by the + // specified 'id' if the attribute exists, and 0 otherwise. + + static const bdlat_AttributeInfo* lookupAttributeInfo(const char* name, + int nameLength); + // Return attribute information for the attribute indicated by the + // specified 'name' of the specified 'nameLength' if the attribute + // exists, and 0 otherwise. + + // CREATORS + explicit LogDumpConfig(bslma::Allocator* basicAllocator = 0); + // Create an object of type 'LogDumpConfig' having the default value. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. + + LogDumpConfig(const LogDumpConfig& original, + bslma::Allocator* basicAllocator = 0); + // Create an object of type 'LogDumpConfig' having the value of the + // specified 'original' object. Use the optionally specified + // 'basicAllocator' to supply memory. If 'basicAllocator' is 0, the + // currently installed default allocator is used. + +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ + defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + LogDumpConfig(LogDumpConfig&& original) noexcept; + // Create an object of type 'LogDumpConfig' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. + + LogDumpConfig(LogDumpConfig&& original, bslma::Allocator* basicAllocator); + // Create an object of type 'LogDumpConfig' having the value of the + // specified 'original' object. After performing this action, the + // 'original' object will be left in a valid, but unspecified state. + // Use the optionally specified 'basicAllocator' to supply memory. If + // 'basicAllocator' is 0, the currently installed default allocator is + // used. +#endif + + ~LogDumpConfig(); + // Destroy this object. + + // MANIPULATORS + LogDumpConfig& operator=(const LogDumpConfig& rhs); + // Assign to this object the value of the specified 'rhs' object. + +#if defined(BSLS_COMPILERFEATURES_SUPPORT_RVALUE_REFERENCES) && \ + defined(BSLS_COMPILERFEATURES_SUPPORT_NOEXCEPT) + LogDumpConfig& operator=(LogDumpConfig&& rhs); + // Assign to this object the value of the specified 'rhs' object. + // After performing this action, the 'rhs' object will be left in a + // valid, but unspecified state. +#endif + + void reset(); + // Reset this object to the default value (i.e., its value upon + // default construction). + + template + int manipulateAttributes(t_MANIPULATOR& manipulator); + // Invoke the specified 'manipulator' sequentially on the address of + // each (modifiable) attribute of this object, supplying 'manipulator' + // with the corresponding attribute information structure until such + // invocation returns a non-zero value. Return the value from the + // last invocation of 'manipulator' (i.e., the invocation that + // terminated the sequence). + + template + int manipulateAttribute(t_MANIPULATOR& manipulator, int id); + // Invoke the specified 'manipulator' on the address of + // the (modifiable) attribute indicated by the specified 'id', + // supplying 'manipulator' with the corresponding attribute + // information structure. Return the value returned from the + // invocation of 'manipulator' if 'id' identifies an attribute of this + // class, and -1 otherwise. + + template + int manipulateAttribute(t_MANIPULATOR& manipulator, + const char* name, + int nameLength); + // Invoke the specified 'manipulator' on the address of + // the (modifiable) attribute indicated by the specified 'name' of the + // specified 'nameLength', supplying 'manipulator' with the + // corresponding attribute information structure. Return the value + // returned from the invocation of 'manipulator' if 'name' identifies + // an attribute of this class, and -1 otherwise. + + int& recordBufferSize(); + // Return a reference to the modifiable "RecordBufferSize" attribute of + // this object. + + bsl::string& recordingLevel(); + // Return a reference to the modifiable "RecordingLevel" attribute of + // this object. + + bsl::string& triggerLevel(); + // Return a reference to the modifiable "TriggerLevel" attribute of + // this object. + + // ACCESSORS + bsl::ostream& + print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const; + // Format this object to the specified output 'stream' at the + // optionally specified indentation 'level' and return a reference to + // the modifiable 'stream'. If 'level' is specified, optionally + // specify 'spacesPerLevel', the number of spaces per indentation level + // for this and all of its nested objects. Each line is indented by + // the absolute value of 'level * spacesPerLevel'. If 'level' is + // negative, suppress indentation of the first line. If + // 'spacesPerLevel' is negative, suppress line breaks and format the + // entire output on one line. If 'stream' is initially invalid, this + // operation has no effect. Note that a trailing newline is provided + // in multiline mode only. + + template + int accessAttributes(t_ACCESSOR& accessor) const; + // Invoke the specified 'accessor' sequentially on each + // (non-modifiable) attribute of this object, supplying 'accessor' + // with the corresponding attribute information structure until such + // invocation returns a non-zero value. Return the value from the + // last invocation of 'accessor' (i.e., the invocation that terminated + // the sequence). + + template + int accessAttribute(t_ACCESSOR& accessor, int id) const; + // Invoke the specified 'accessor' on the (non-modifiable) attribute + // of this object indicated by the specified 'id', supplying 'accessor' + // with the corresponding attribute information structure. Return the + // value returned from the invocation of 'accessor' if 'id' identifies + // an attribute of this class, and -1 otherwise. + + template + int accessAttribute(t_ACCESSOR& accessor, + const char* name, + int nameLength) const; + // Invoke the specified 'accessor' on the (non-modifiable) attribute + // of this object indicated by the specified 'name' of the specified + // 'nameLength', supplying 'accessor' with the corresponding attribute + // information structure. Return the value returned from the + // invocation of 'accessor' if 'name' identifies an attribute of this + // class, and -1 otherwise. + + int recordBufferSize() const; + // Return the value of the "RecordBufferSize" attribute of this object. + + const bsl::string& recordingLevel() const; + // Return a reference offering non-modifiable access to the + // "RecordingLevel" attribute of this object. + + const bsl::string& triggerLevel() const; + // Return a reference offering non-modifiable access to the + // "TriggerLevel" attribute of this object. + + // HIDDEN FRIENDS + friend bool operator==(const LogDumpConfig& lhs, const LogDumpConfig& rhs) + // Return 'true' if the specified 'lhs' and 'rhs' attribute objects + // have the same value, and 'false' otherwise. Two attribute objects + // have the same value if each respective attribute has the same value. + { + return lhs.recordBufferSize() == rhs.recordBufferSize() && + lhs.recordingLevel() == rhs.recordingLevel() && + lhs.triggerLevel() == rhs.triggerLevel(); + } + + friend bool operator!=(const LogDumpConfig& lhs, const LogDumpConfig& rhs) + // Returns '!(lhs == rhs)' + { + return !(lhs == rhs); + } + + friend bsl::ostream& operator<<(bsl::ostream& stream, + const LogDumpConfig& rhs) + // Format the specified 'rhs' to the specified output 'stream' and + // return a reference to the modifiable 'stream'. + { + return rhs.print(stream, 0, -1); + } + + template + friend void hashAppend(t_HASH_ALGORITHM& hashAlg, + const LogDumpConfig& object) + // Pass the specified 'object' to the specified 'hashAlg'. This + // function integrates with the 'bslh' modular hashing system and + // effectively provides a 'bsl::hash' specialization for + // 'LogDumpConfig'. + { + object.hashAppendImpl(hashAlg); + } +}; + +} // close package namespace + +// TRAITS + +BDLAT_DECL_SEQUENCE_WITH_ALLOCATOR_BITWISEMOVEABLE_TRAITS( + mqbcfg::LogDumpConfig) + +namespace mqbcfg { + // =============================== // class MasterAssignmentAlgorithm // =============================== @@ -4896,6 +5142,7 @@ class LogController { bsl::string d_bslsLogSeverityThreshold; bsl::string d_consoleSeverityThreshold; SyslogConfig d_syslog; + LogDumpConfig d_logDump; int d_fileMaxAgeDays; int d_rotationBytes; @@ -4917,10 +5164,11 @@ class LogController { ATTRIBUTE_ID_BSLS_LOG_SEVERITY_THRESHOLD = 6, ATTRIBUTE_ID_CONSOLE_SEVERITY_THRESHOLD = 7, ATTRIBUTE_ID_CATEGORIES = 8, - ATTRIBUTE_ID_SYSLOG = 9 + ATTRIBUTE_ID_SYSLOG = 9, + ATTRIBUTE_ID_LOG_DUMP = 10 }; - enum { NUM_ATTRIBUTES = 10 }; + enum { NUM_ATTRIBUTES = 11 }; enum { ATTRIBUTE_INDEX_FILE_NAME = 0, @@ -4932,7 +5180,8 @@ class LogController { ATTRIBUTE_INDEX_BSLS_LOG_SEVERITY_THRESHOLD = 6, ATTRIBUTE_INDEX_CONSOLE_SEVERITY_THRESHOLD = 7, ATTRIBUTE_INDEX_CATEGORIES = 8, - ATTRIBUTE_INDEX_SYSLOG = 9 + ATTRIBUTE_INDEX_SYSLOG = 9, + ATTRIBUTE_INDEX_LOG_DUMP = 10 }; // CONSTANTS @@ -5072,6 +5321,10 @@ class LogController { // Return a reference to the modifiable "Syslog" attribute of this // object. + LogDumpConfig& logDump(); + // Return a reference to the modifiable "LogDump" attribute of this + // object. + // ACCESSORS bsl::ostream& print(bsl::ostream& stream, int level = 0, int spacesPerLevel = 4) const; @@ -5153,6 +5406,10 @@ class LogController { // Return a reference offering non-modifiable access to the "Syslog" // attribute of this object. + const LogDumpConfig& logDump() const; + // Return a reference offering non-modifiable access to the "LogDump" + // attribute of this object. + // HIDDEN FRIENDS friend bool operator==(const LogController& lhs, const LogController& rhs) // Return 'true' if the specified 'lhs' and 'rhs' attribute objects @@ -10778,6 +11035,186 @@ inline int Heartbeat::clusterPeer() const return d_clusterPeer; } +// ------------------- +// class LogDumpConfig +// ------------------- + +// PRIVATE ACCESSORS +template +void LogDumpConfig::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const +{ + using bslh::hashAppend; + hashAppend(hashAlgorithm, this->recordBufferSize()); + hashAppend(hashAlgorithm, this->recordingLevel()); + hashAppend(hashAlgorithm, this->triggerLevel()); +} + +// CLASS METHODS +// MANIPULATORS +template +int LogDumpConfig::manipulateAttributes(t_MANIPULATOR& manipulator) +{ + int ret; + + ret = manipulator( + &d_recordBufferSize, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE]); + if (ret) { + return ret; + } + + ret = manipulator(&d_recordingLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORDING_LEVEL]); + if (ret) { + return ret; + } + + ret = manipulator(&d_triggerLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TRIGGER_LEVEL]); + if (ret) { + return ret; + } + + return 0; +} + +template +int LogDumpConfig::manipulateAttribute(t_MANIPULATOR& manipulator, int id) +{ + enum { NOT_FOUND = -1 }; + + switch (id) { + case ATTRIBUTE_ID_RECORD_BUFFER_SIZE: { + return manipulator( + &d_recordBufferSize, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE]); + } + case ATTRIBUTE_ID_RECORDING_LEVEL: { + return manipulator( + &d_recordingLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORDING_LEVEL]); + } + case ATTRIBUTE_ID_TRIGGER_LEVEL: { + return manipulator( + &d_triggerLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TRIGGER_LEVEL]); + } + default: return NOT_FOUND; + } +} + +template +int LogDumpConfig::manipulateAttribute(t_MANIPULATOR& manipulator, + const char* name, + int nameLength) +{ + enum { NOT_FOUND = -1 }; + + const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, + nameLength); + if (0 == attributeInfo) { + return NOT_FOUND; + } + + return manipulateAttribute(manipulator, attributeInfo->d_id); +} + +inline int& LogDumpConfig::recordBufferSize() +{ + return d_recordBufferSize; +} + +inline bsl::string& LogDumpConfig::recordingLevel() +{ + return d_recordingLevel; +} + +inline bsl::string& LogDumpConfig::triggerLevel() +{ + return d_triggerLevel; +} + +// ACCESSORS +template +int LogDumpConfig::accessAttributes(t_ACCESSOR& accessor) const +{ + int ret; + + ret = accessor(d_recordBufferSize, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE]); + if (ret) { + return ret; + } + + ret = accessor(d_recordingLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORDING_LEVEL]); + if (ret) { + return ret; + } + + ret = accessor(d_triggerLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TRIGGER_LEVEL]); + if (ret) { + return ret; + } + + return 0; +} + +template +int LogDumpConfig::accessAttribute(t_ACCESSOR& accessor, int id) const +{ + enum { NOT_FOUND = -1 }; + + switch (id) { + case ATTRIBUTE_ID_RECORD_BUFFER_SIZE: { + return accessor( + d_recordBufferSize, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORD_BUFFER_SIZE]); + } + case ATTRIBUTE_ID_RECORDING_LEVEL: { + return accessor(d_recordingLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_RECORDING_LEVEL]); + } + case ATTRIBUTE_ID_TRIGGER_LEVEL: { + return accessor(d_triggerLevel, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_TRIGGER_LEVEL]); + } + default: return NOT_FOUND; + } +} + +template +int LogDumpConfig::accessAttribute(t_ACCESSOR& accessor, + const char* name, + int nameLength) const +{ + enum { NOT_FOUND = -1 }; + + const bdlat_AttributeInfo* attributeInfo = lookupAttributeInfo(name, + nameLength); + if (0 == attributeInfo) { + return NOT_FOUND; + } + + return accessAttribute(accessor, attributeInfo->d_id); +} + +inline int LogDumpConfig::recordBufferSize() const +{ + return d_recordBufferSize; +} + +inline const bsl::string& LogDumpConfig::recordingLevel() const +{ + return d_recordingLevel; +} + +inline const bsl::string& LogDumpConfig::triggerLevel() const +{ + return d_triggerLevel; +} + // ------------------------------- // class MasterAssignmentAlgorithm // ------------------------------- @@ -13490,6 +13927,7 @@ void LogController::hashAppendImpl(t_HASH_ALGORITHM& hashAlgorithm) const hashAppend(hashAlgorithm, this->consoleSeverityThreshold()); hashAppend(hashAlgorithm, this->categories()); hashAppend(hashAlgorithm, this->syslog()); + hashAppend(hashAlgorithm, this->logDump()); } inline bool LogController::isEqualTo(const LogController& rhs) const @@ -13505,7 +13943,7 @@ inline bool LogController::isEqualTo(const LogController& rhs) const this->consoleSeverityThreshold() == rhs.consoleSeverityThreshold() && this->categories() == rhs.categories() && - this->syslog() == rhs.syslog(); + this->syslog() == rhs.syslog() && this->logDump() == rhs.logDump(); } // CLASS METHODS @@ -13576,6 +14014,12 @@ int LogController::manipulateAttributes(t_MANIPULATOR& manipulator) return ret; } + ret = manipulator(&d_logDump, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOG_DUMP]); + if (ret) { + return ret; + } + return 0; } @@ -13632,6 +14076,10 @@ int LogController::manipulateAttribute(t_MANIPULATOR& manipulator, int id) return manipulator(&d_syslog, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SYSLOG]); } + case ATTRIBUTE_ID_LOG_DUMP: { + return manipulator(&d_logDump, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOG_DUMP]); + } default: return NOT_FOUND; } } @@ -13702,6 +14150,11 @@ inline SyslogConfig& LogController::syslog() return d_syslog; } +inline LogDumpConfig& LogController::logDump() +{ + return d_logDump; +} + // ACCESSORS template int LogController::accessAttributes(t_ACCESSOR& accessor) const @@ -13769,6 +14222,11 @@ int LogController::accessAttributes(t_ACCESSOR& accessor) const return ret; } + ret = accessor(d_logDump, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOG_DUMP]); + if (ret) { + return ret; + } + return 0; } @@ -13822,6 +14280,10 @@ int LogController::accessAttribute(t_ACCESSOR& accessor, int id) const return accessor(d_syslog, ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_SYSLOG]); } + case ATTRIBUTE_ID_LOG_DUMP: { + return accessor(d_logDump, + ATTRIBUTE_INFO_ARRAY[ATTRIBUTE_INDEX_LOG_DUMP]); + } default: return NOT_FOUND; } } @@ -13892,6 +14354,11 @@ inline const SyslogConfig& LogController::syslog() const return d_syslog; } +inline const LogDumpConfig& LogController::logDump() const +{ + return d_logDump; +} + // --------------------- // class PartitionConfig // --------------------- @@ -18094,6 +18561,13 @@ inline const AppConfig& Configuration::appConfig() const } // close enterprise namespace #endif -// GENERATED BY BLP_BAS_CODEGEN_2024.07.18 +// GENERATED BY BLP_BAS_CODEGEN_2024.10.17 // USING bas_codegen.pl -m msg --noAggregateConversion --noExternalization // --noIdent --package mqbcfg --msgComponent messages mqbcfg.xsd +// ---------------------------------------------------------------------------- +// NOTICE: +// Copyright 2024 Bloomberg Finance L.P. All rights reserved. +// Property of Bloomberg Finance L.P. (BFLP) +// This software is made available solely pursuant to the +// terms of a BFLP license agreement which governs its use. +// ------------------------------- END-OF-FILE --------------------------------