MCPcopy Create free account
hub / github.com/COVESA/vsomeip / message

Method message

implementation/logger/src/message.cpp:79–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77namespace logger {
78
79message::message(level_e _level) : std::ostream(&buffer_), level_{_level} {
80 const auto* its_logger = logger_impl::get();
81 if (!its_logger) {
82 // May happen when trying to log during program termination
83 return;
84 }
85
86 // Store logger config locally to avoid repeated access to atomics
87 // TODO: Simplify once access to logger config no longer needs to be threadsafe
88 auto its_cfg = its_logger->get_configuration();
89 console_enabled_ = its_cfg.console_enabled;
90 dlt_enabled_ = its_cfg.dlt_enabled;
91 file_enabled_ = its_cfg.file_enabled;
92
93 // Check whether this message should be logged at all
94 if ((console_enabled_ || dlt_enabled_ || file_enabled_) && level_ <= its_cfg.loglevel) {
95 buffer_.activate();
96 when_ = std::chrono::system_clock::now();
97 }
98}
99
100message::~message() try {
101 if (!buffer_.is_active()) {

Callers 15

get_all_files_in_dirMethod · 0.80
get_all_files_in_dirMethod · 0.80
TEST_PFunction · 0.80
disconnectMethod · 0.80
try_addMethod · 0.80
disconnectMethod · 0.80
async_receiveMethod · 0.80
wait_for_offer_serviceFunction · 0.80
setup_socketFunction · 0.80
TEST_FFunction · 0.80
TESTFunction · 0.80
TEST_FFunction · 0.80

Calls 2

activateMethod · 0.80
get_configurationMethod · 0.45

Tested by 6

TEST_PFunction · 0.64
wait_for_offer_serviceFunction · 0.64
setup_socketFunction · 0.64
TEST_FFunction · 0.64
TESTFunction · 0.64
TEST_FFunction · 0.64