Search the Community
Showing results for tags 'sc_report_handler'.
Dear all, i am designing a network simulator where a lot of messages are flying around. For logging and debugging the states of the modules and the simulation i use the sc_report_handler class. In main.cpp i set the following options: sc_report_handler::set_verbosity_level(verbosity); sc_report_handler::set_log_file_name("out.log"); sc_report_handler::set_actions(SC_INFO, SC_LOG); sc_report_handler::set_actions(SC_WARNING, SC_LOG); verbosity is a variable passed from a configuration file. In my files/modules etc i have usually code like this to print into the log file: std::stringstream ss; ss << this->name() << " some message, maybe with variables like x: " << x; SC_REPORT_INFO_VERB(msgId, ss.str().c_str(), sc_core::SC_DEBUG); I use the stringstream to format like i want and set the verbosity. I have a lot Before i start the simulation i read a configuration file with lots of parameters. There is also the verbosity level inside: # Verbosity level # None, Low, Medium, High, Full, Debug verbosity = None In my code i have several SC_REPORT_INFO_VERB commands with different verbosity levels, so that i can track different information on my needs for debugging. Now to my problem/question: Depending on the verbosity i get different simulation results. How the sc_report_handler can affect the simulation? Maybe i am doing something wrong, bit this behavious is really confusing for me. Thank you very much.