|
libadc-cxx 1.0.0
Structured logging for scientific computing
|
Namespaces | |
| namespace | impl |
Classes | |
| class | builder |
| Implementation of builder_api with optional (compile-time) support of MPI. If compiled without MPI, the mpi-related calls devolve to serial behavior. More... | |
| class | builder_api |
| The builder api is used to construct structured log (json) messages that follow naming conventions. More... | |
| class | curl_plugin |
| Curl utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to the configured web service by invoking the 'curl' utility. Multiple independent instances of this plugin may be used simultaneously. More... | |
| class | factory |
| provides publishers and builders of application metadata. More... | |
| struct | field |
| class | file_plugin |
| File output publisher_api implementation. This plugin generates writes each message to the configured file, with <adct-json></adct-json> delimiters surrounding it. The output directory is "." by default, but may be overriden with a full path defined in env("ADC_FILE_PLUGIN_DIRECTORY"). The file name is adc.file_plugin.log by default, and may be overridden with a path name in env("ADC_FILE_PLUGIN_FILE"). The file is overwritten when the file_plugin is created, unless env("ADC_FILE_PLUGIN_APPEND") is "true". Debugging output is enabled if env("ADC_FILE_PLUGIN_DEBUG") is a number greater than 0. More... | |
| struct | item |
| class | ldms_message_publish_plugin |
| ldms_message_publish utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to ldmsd by invoking the 'ldms_message_publish' utility available in ldms versions from 4.5. Use the ldmsd_stream_publish_plugin for ldms versions 4.4 and below. More... | |
| class | ldmsd_stream_publish_plugin |
| ldmsd_stream_publish utility publisher_api implementation. This plugin generates a scratch file (in-memory) and asynchronously sends it to ldmsd by invoking the 'ldmsd_stream_publish' utility available in ldms versions up to 4.4. Use the ldms_message_publish_plugin for ldms versions 4.5 and above. More... | |
| class | libadiak_json_plugin |
| Terminal output publisher_api implementation. This plugin sends messages to libadiak synchronously. Multiple independent instances of this plugin may be used simultaneously, but message integrity depends on the behavior of libadiak. More... | |
| class | libadiak_many_plugin |
| Terminal output publisher_api implementation. This plugin sends messages to libadiak synchronously. Multiple independent instances of this plugin may be used simultaneously, but message integrity depends on the behavior of libadiak_many. As of 6/2025, adiak objects assume the caller is single-threaded. More... | |
| class | libcurl_plugin |
| NOT yet implemented publisher plugin that will eventually use libcurl. More... | |
| class | libldms_msg_publish_plugin |
| libldms_msg_publish publisher_api implementation. This plugin calls the ldms libraries for sending messages. More... | |
| class | multi_publisher |
| class | multi_publisher_api |
| Interface for a group of publishers all being fed the same message(s). More... | |
| class | multifile_plugin |
| Parallel file output publisher_api implementation. This plugin generates writes each message to the configured directory tree with <adct-json></adct-json> delimiters surrounding it. The output directory is "." by default, but may be overriden with a full path defined in env("ADC_MULTIFILE_PLUGIN_DIRECTORY"). The resulting mass of files can be reduced independently later by concatenating all files in the tree or more selectively with a single call to the adc::consolidate_multifile_logs() function. More... | |
| class | none_plugin |
| Message suppression publisher; it quietly ignores all publication requests. More... | |
| class | out_pipe |
| struct | pipe_data |
| class | publisher_api |
| Publisher plugin interface. More... | |
| class | script_plugin |
| User script publisher plugin. The program specified by environment variable is used to asynchronously deliver published messages. It is invoked in a shell as: ($prog $messagefile > /dev/null 2>&1 || /bin/rm $messagefile) &. More... | |
| class | stdout_plugin |
| Terminal output publisher_api implementation. This plugin sends messages to stdout synchronously. Multiple independent instances of this plugin may be used simultaneously, but message integrity depends on the behavior of stdout. More... | |
| class | syslog_plugin |
| syslog publisher_api implementation. This plugin sends messages to syslog synchronously. Multiple independent instances of this plugin may be used simultaneously, but the underlying syslog setting (priority) will be that of the most recently created instance unless a map with "PRIORITY" is supplied to config(). More... | |
| class | var_string |
| return string for printing from variant v. More... | |
| struct | version |
| A version with tags list. More... | |
Typedefs | |
| typedef int32_t | adc_hs_subsection_flags |
| typedef int32_t | adc_mpi_field_flags |
| typedef std::string | string |
| typedef std::string_view | string_view |
| typedef std::map< const std::string, std::shared_ptr< publisher_api > > | plugin_map |
| name/plugin map. | |
| typedef std::vector< std::shared_ptr< publisher_api > > | publisher_vector |
| list of publishers | |
| typedef std::pair< std::string, std::shared_ptr< publisher_api > > | pair_string_publisher_api |
| named publisher | |
| typedef std::variant< bool, char, char16_t, char32_t, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, float, double, std::complex< float >, std::complex< double >, std::array< int64_t, 2 >, std::string, std::shared_ptr< bool[]>, std::shared_ptr< char[]>, std::shared_ptr< char16_t[]>, std::shared_ptr< char32_t[]>, std::shared_ptr< int8_t[]>, std::shared_ptr< int16_t[]>, std::shared_ptr< int32_t[]>, std::shared_ptr< int64_t[]>, std::shared_ptr< uint8_t[]>, std::shared_ptr< uint16_t[]>, std::shared_ptr< uint32_t[]>, std::shared_ptr< uint64_t[]>, std::shared_ptr< float[]>, std::shared_ptr< double[]>, std::shared_ptr< std::complex< float >[]>, std::shared_ptr< std::complex< double >[]>, std::shared_ptr< std::string[]> > | variant |
| variant for querying builder data. | |
Enumerations | |
| enum | scalar_type { cp_none , cp_bool , cp_char , cp_char16 , cp_char32 , cp_cstr , cp_json_str , cp_yaml_str , cp_xml_str , cp_json , cp_path , cp_number_str , cp_uint8 , cp_uint16 , cp_uint32 , cp_uint64 , cp_int8 , cp_int16 , cp_int32 , cp_int64 , cp_f32 , cp_f64 , cp_f80 , cp_f128 , cp_f8_e4m3 , cp_f8_e5m2 , cp_f16_e5m10 , cp_f16_e8m7 , cp_c_f32 , cp_c_f64 , cp_c_f80 , cp_c_f128 , cp_timespec , cp_timeval , cp_epoch , cp_char8 , cp_last } |
| field types for scientific data encode/decode with json. More... | |
| enum | key_type { k_none , k_section , k_value } |
| when expanding scalar_type, always update enum.ipp to match. More... | |
| enum | object_type { co_list = cp_last , co_map , co_array , co_scalar } |
| classification of json-adjacent structure elements. This is not currently in use and may be retired soon. More... | |
Functions | |
| std::string | format_timespec_8601 (struct timespec &ts) |
| std::string | format_timespec_utc_ns (struct timespec &ts) |
| size_t | b64_length (size_t input_len) |
| size_t | binary_length (size_t input_len) |
| unsigned char * | base64 (const unsigned char *binary, size_t binary_len, unsigned char *b64buf, size_t b64buf_length) |
| unsigned char * | decode64 (const unsigned char *b64buf, size_t b64buf_length, unsigned char *binary, size_t binary_len) |
| bool | array_contains_string (boost::json::array &av, string_view uuid) |
| std::vector< std::string > | split_string (const std::string &s, char delimiter) |
| bool | badkey (std::string_view) |
| std::string_view | strip (std::string_view s, char c='/') |
| std::string | tolower_s (std::string s) |
| std::string | get_exe (size_t bufsize) |
| std::string | get_lscpu () |
| std::string | get_default_affinity () |
| std::vector< std::string > | get_libs (std::string_view) |
| boost::json::object | get_numa_hardware () |
| boost::json::object | get_gpu_data (bool debug) |
| uint64_t | get_memtotal () |
| void | update_meminfo (bool debug) |
| void | fill_array_bool (field &f, boost::json::array &a) |
| void | fill_array_string (field &f, boost::json::array &a) |
| boost::json::kind | scalar_type_representation (scalar_type st) |
| scalar_type | scalar_type_from_name (const std::string &name) |
| get the enum representation of a scalar_type string | |
| const std::string | to_string (float) |
| get string of float using to_chars. | |
| const std::string | to_string (double) |
| get string of double using to_chars. | |
| const std::string | to_string (void *data, scalar_type cptype, size_t count) |
| get string of array | |
| const std::string | to_string (scalar_type st) |
| get the string representation of a scalar_type value | |
| int | test_enum_strings () |
| return non-zero if to_string and enum scalar_type are inconsisent. | |
| ADC_VISIBLE std::vector< std::string > | consolidate_multifile_logs (const std::string &match, std::vector< std::string > &old_paths, bool debug=false) |
| ADC_VISIBLE std::string | get_multifile_log_path (string_view dir, string_view wfid) |
| ADC_VISIBLE std::vector< size_t > | validate_multifile_log (string_view filename, bool check_json, size_t &record_count) |
| scalar_type | adiak_type_to_adc_type (adiak_type_t at) |
| const string | plugin_libcurl_prefix ("ADC_LIBCURL_PLUGIN_") |
| int | get_priority_from_string (string s) |
Variables | |
| version | builder_api_version ("1.0.0", {"none"}) |
| version | builder_version ("1.0.0", {"none"}) |
| const size_t | meminfo_raw = 9 |
| version | adc_factory_version ("1.0.0", {"none"}) |
| std::map< const std::string, const std::string > | libadiak_json_defaults |
| const std::map< string, string > | plugin_libcurl_config_defaults |
| std::map< const std::string, const std::string > | stdout_defaults |
| version | multi_publisher_version (MULTI_PUBLISHER_VERSION, MULTI_PUBLISHER_TAGS) |
| version | publisher_api_version ("1.0.0", {"none"}) |
| version | enum_version ("1.0.0", {"none"}) |
| the version number of enum scalar_type and object_type | |
| version | adc_utility_version ("1.0.0", {"none"}) |
| typedef std::string adc::string |
| typedef std::string_view adc::string_view |
| unsigned char * adc::base64 | ( | const unsigned char * | binary, |
| size_t | binary_len, | ||
| unsigned char * | b64buf, | ||
| size_t | b64buf_length | ||
| ) |
| unsigned char * adc::decode64 | ( | const unsigned char * | b64buf, |
| size_t | b64buf_length, | ||
| unsigned char * | binary, | ||
| size_t | binary_len | ||
| ) |
| bool adc::array_contains_string | ( | boost::json::array & | av, |
| string_view | uuid | ||
| ) |
Definition at line 1587 of file builder.ipp.
| std::vector< std::string > adc::split_string | ( | const std::string & | s, |
| char | delimiter | ||
| ) |
Definition at line 473 of file builder.ipp.
|
inline |
Definition at line 39 of file builder.ipp.
| std::string_view adc::strip | ( | std::string_view | s, |
| char | c = '/' |
||
| ) |
Definition at line 47 of file builder.ipp.
| std::string adc::tolower_s | ( | std::string | s | ) |
Definition at line 58 of file builder.ipp.
| std::string adc::get_exe | ( | size_t | bufsize | ) |
Definition at line 66 of file builder.ipp.
| std::string adc::get_lscpu | ( | ) |
Definition at line 103 of file builder.ipp.
| std::vector< std::string > adc::get_libs | ( | std::string_view | ) |
Definition at line 146 of file builder.ipp.
| boost::json::object adc::get_numa_hardware | ( | ) |
Definition at line 164 of file builder.ipp.
| boost::json::object adc::get_gpu_data | ( | bool | debug | ) |
Definition at line 223 of file builder.ipp.
| uint64_t adc::get_memtotal | ( | ) |
Definition at line 351 of file builder.ipp.
| void adc::update_meminfo | ( | bool | debug | ) |
Definition at line 375 of file builder.ipp.
| void adc::fill_array_bool | ( | field & | f, |
| boost::json::array & | a | ||
| ) |
Definition at line 1017 of file builder.ipp.
| void adc::fill_array_string | ( | field & | f, |
| boost::json::array & | a | ||
| ) |
Definition at line 1035 of file builder.ipp.
| boost::json::kind adc::scalar_type_representation | ( | scalar_type | st | ) |
| scalar_type adc::adiak_type_to_adc_type | ( | adiak_type_t | at | ) |
Definition at line 17 of file libadiak_many.ipp.
| const string adc::plugin_libcurl_prefix | ( | "ADC_LIBCURL_PLUGIN_" | ) |
| int adc::get_priority_from_string | ( | string | s | ) |
Definition at line 21 of file syslog.ipp.
|
inline |
| const size_t adc::meminfo_raw = 9 |
Definition at line 348 of file builder.ipp.
| std::map< const std::string, const std::string> adc::libadiak_json_defaults |
Definition at line 12 of file libadiak_json.ipp.
Definition at line 23 of file libcurl.ipp.
| std::map< const std::string, const std::string> adc::stdout_defaults |
Definition at line 14 of file stdout.ipp.