Flow 2.0.0
Flow project: Public API.
Classes | Namespaces | Macros
config.hpp File Reference

Classes

class  flow::log::Config
 Class used to configure the filtering and logging behavior of Loggers; its use in your custom Loggers is optional but encouraged; supports dynamically changing filter settings even while concurrent logging occurs. More...
 

Namespaces

namespace  flow
 Catch-all namespace for the Flow project: A collection of various production-quality modules written in modern C++17, originally by ygoldfel.
 
namespace  flow::log
 Flow module providing logging functionality.
 

Macros

#define FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_PTR   value_for_exposition
 Macro (preprocessor symbol) to optionally set (when building Flow and translation units that use flow::log::Config) to override a certain flow::log::Config internal behavior that can affect flow::log::Logger::should_log() perf. More...
 
#define FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_VAL   value_for_exposition
 Cousin of FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_PTR, similarly affecting a related behavior. More...
 

Macro Definition Documentation

◆ FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_PTR

#define FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_PTR   value_for_exposition

Macro (preprocessor symbol) to optionally set (when building Flow and translation units that use flow::log::Config) to override a certain flow::log::Config internal behavior that can affect flow::log::Logger::should_log() perf.

Typically there is no need to set this, especially if when calling flow::log::Config::init_component_to_union_idx_mapping() one always provides arg value component_payload_type_info_ptr_is_uniq = false (safe default). (Note: It is recommended to in fact set it to true.) So, if relevant, and if your benchmarks show should_log() is using significant processor cycles, it can make sense to experiment by setting this to other values; namely:

  • "::flow::log::Component_payload_type_dict_by_ptr_via_tree_map"
  • "::flow::log::Component_payload_type_dict_by_ptr_via_s_hash_map"
  • "::flow::log::Component_payload_type_dict_by_ptr_via_b_hash_map"
  • "::flow::log::Component_payload_type_dict_by_ptr_via_array"
  • "::flow::log::Component_payload_type_dict_by_ptr_via_sorted_array"

Adventurous types can also implement their own such a template, as long as it implements the semantics of "flow::log::Component_payload_type_dict_by_ptr_via_tree_map".

See also
flow::log::Config class doc header Performance section for an overall recipe.

◆ FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_VAL

#define FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_VAL   value_for_exposition

Cousin of FLOW_LOG_CONFIG_COMPONENT_PAYLOAD_TYPE_DICT_BY_PTR, similarly affecting a related behavior.

Again typically there is no need to set this, especially if when calling flow::log::Config::init_component_to_union_idx_mapping() one always provides arg value component_payload_type_info_ptr_is_uniq = true. Otherwise, and if your benchmarks show should_log() is using significant processor cycles, it can make sense to experiment by setting this to other values; namely:

  • "::flow::log::Component_payload_type_dict_by_val_via_tree_map"
  • "::flow::log::Component_payload_type_dict_by_val_via_s_hash_map"
  • "::flow::log::Component_payload_type_dict_by_val_via_b_hash_map"
  • "::flow::log::Component_payload_type_dict_by_val_via_array"
  • "::flow::log::Component_payload_type_dict_by_val_via_sorted_array"

Adventurous types can also implement their own such a template, as long as it implements the semantics of "flow::log::Component_payload_type_dict_by_val_via_tree_map".

See also
flow::log::Config class doc header Performance section for an overall recipe.