loggers Class Reference

This class provides basic functionalities for an ITS dictionary. More...

`#include <loggers.hh>`

Inheritance diagram for loggers:

## Public Member Functions

virtual | ~loggers ()
| Default destructor. More...
void | log_to_hexa (const char *p_prompt, const TTCN_Buffer &buffer)
| Hexa dump of the. More...
void | log_to_hexa (const char *p_prompt, const OCTETSTRING &msg)
| Hexa dump of the. More...
void | log_to_hexa (const char *p_prompt, const unsigned char *msg, const size_t msg_size)
| Hexa dump of the provided buffer. More...
void | log_msg (const char *p_prompt, const Base_Type &p_type)
| Debug log of TITAN data structures. More...
void | log (const char *p_fmt,...)
| Debug message based on printf-compliant formatting message. More...
void | user_msg (const char *p_prompt, const Base_Type &p_type)
| User message of TITAN data structures. More...
void | user (const char *p_fmt,...)
| User message based on printf-compliant formatting message. More...
void | warning_msg (const char *p_prompt, const Base_Type &p_type)
void | warning (const char *p_fmt,...)
void | error (const char *p_fmt,...)
void | set_start_time (std::string &p_time_key)
| Start execution time measurement. More...
void | set_stop_time (std::string &p_time_key, float &p_time)
| Stop execution time measurement. More...

## Static Public Member Functions

static loggers & | get_instance ()
| Accessor for the unique instance of the logger framework . More...

## Private Member Functions

| loggers ()
| Timer used to measure execution time between calls to methods ::set_start_time and ::set_stop_time. More...
void | log_time_exec (const char *p_fmt,...)

## Private Attributes

std::map< std::string, std::clock_t > | _times
| Smart pointer to the unique instance of the logger framework. More...

## Static Private Attributes

static std::unique_ptr< loggers > | _instance = static_cast<std::unique_ptr<loggers>>(new loggers)

## Detailed Description

This class provides basic functionalities for an ITS dictionary.

pattern

Todo:
  Remove reference to TTCN3.hh

## Constructor & Destructor Documentation

## loggers()

loggers::loggers | ( |  | ) |

inlineexplicitprivate

Timer used to measure execution time between calls to methods ::set_start_time and ::set_stop_time.

Default constructor Create a new instance of the loggers class

## ~loggers()

virtual loggers::~loggers | ( |  | ) |

inlinevirtual

Default destructor.

## Member Function Documentation

## error()

void loggers::error | ( | const char * | p_fmt,
|  |  | ...
| ) |  |

inline

## get_instance()

static loggers & loggers::get_instance | ( |  | ) |

inlinestatic

Accessor for the unique instance of the logger framework .

## log()

void loggers::log | ( | const char * | p_fmt,
|  |  | ...
| ) |  |

inline

Debug message based on printf-compliant formatting message.

Parameters

  [in] | p_fmt | The printf-compliant format of the message to log
  [in] | ... | The arguments

## log_msg()

void loggers::log_msg | ( | const char * | p_prompt,
|  | const Base_Type & | p_type
| ) |  |

inline

Debug log of TITAN data structures.

Parameters

  [in] | p_prompt | Label of the log to be produced
  [in] | msg | The TITAN data structure to log

## log_time_exec()

void loggers::log_time_exec | ( | const char * | p_fmt,
|  |  | ...
| ) |  |

inlineprivate

## log_to_hexa() [1/3]

void loggers::log_to_hexa | ( | const char * | p_prompt,
|  | const TTCN_Buffer & | buffer
| ) |  |

inline

Hexa dump of the.

See also
  TTCN_Buffer buffer

Parameters

  [in] | p_prompt | Label of the log to be produced
  [in] | buffer | The TTCN_Buffer buffer to dump

## log_to_hexa() [2/3]

void loggers::log_to_hexa | ( | const char * | p_prompt,
|  | const OCTETSTRING & | msg
| ) |  |

inline

Hexa dump of the.

See also
  OCTETSTRING buffer

Parameters

  [in] | p_prompt | Label of the log to be produced
  [in] | msg | The OCTETSTRING buffer to dump

## log_to_hexa() [3/3]

void loggers::log_to_hexa | ( | const char * | p_prompt,
|  | const unsigned char * | msg,
|  | const size_t | msg_size
| ) |  |

inline

Hexa dump of the provided buffer.

Parameters

  [in] | p_prompt | Label of the log to be produced
  [in] | msg | The buffer to dump

## set_start_time()

void loggers::set_start_time | ( | std::string & | p_time_key | ) |

inline

Start execution time measurement.

Parameters

  [in] | p_time_key | A timer identifier (any string)

## set_stop_time()

void loggers::set_stop_time | ( | std::string & | p_time_key,
|  | float & | p_time
| ) |  |

inline

Stop execution time measurement.

Parameters

  [in] | p_time_key | The timer identifier provided while calling

See also
  loggers::set_start_time method

Parameters

  [out] | p_time | The execution time measured in milliseconds

## user()

void loggers::user | ( | const char * | p_fmt,
|  |  | ...
| ) |  |

inline

User message based on printf-compliant formatting message.

Error message based on printf-compliant formatting message.

Warning message based on printf-compliant formatting message.

Parameters

  [in] | p_fmt | The printf-compliant format of the message to log
  [in] | ... | The arguments

## user_msg()

void loggers::user_msg | ( | const char * | p_prompt,
|  | const Base_Type & | p_type
| ) |  |

inline

User message of TITAN data structures.

Warning message of TITAN data structures.

Parameters

  [in] | p_prompt | Label of the log to be produced
  [in] | msg | The TITAN data structure to log

## warning()

void loggers::warning | ( | const char * | p_fmt,
|  |  | ...
| ) |  |

inline

## warning_msg()

void loggers::warning_msg | ( | const char * | p_prompt,
|  | const Base_Type & | p_type
| ) |  |

inline

## Member Data Documentation

## _instance

std::unique_ptr< loggers > loggers::_instance = static_cast<std::unique_ptr<loggers>>(new loggers)

staticprivate

## _times

std::map<std::string, std::clock_t> loggers::_times

private

Smart pointer to the unique instance of the logger framework.

The documentation for this class was generated from the following files:

- /home/vagrant/TriesAndDelete/etsi_its/framework/include/loggers.hh
- /home/vagrant/TriesAndDelete/etsi_its/framework/src/loggers.cc