sat-log-example.cc File Reference

Example for message log class. More...

#include "ns3/core-module.h"
#include "ns3/satellite-module.h"
+ Include dependency graph for sat-log-example.cc:

Go to the source code of this file.

Detailed Description

Example for message log class.

The format for messages is (type, custom file tag, message). Custom file tag is in effect only with LOG_CUSTOM. With other types it does not matter and can be left empty. It is also possible to define a simulation specific tag, which is useful with simulation campaigns for avoiding log file overwrite.

The class specifies the following log types: LOG_GENERIC - for all messages LOG_INFO - for info messages LOG_WARNING - for warning messages LOG_ERROR - for error messages LOG_CUSTOM - for custom messages specified by the second parameter

The output files are located in contrib/satellite/data/logs folder. The output file format is the following: log<type><custom file tag><simulation tag>

With (LOG_CUSTOM, "_exampleTag", "Example message for custom log") and simulation tag "_ut30_beam1" the file log_exampleTag_ut30_beam1 would contain the message "Example message for custom log".

Definition in file sat-log-example.cc.