    

 ## On this page

  

 

 # logger\_verbose

 Last update: 16.07.2025 

[Go to the documentation of this file.](logger__verbose_8h.xhtml)<a id="l00001" name="l00001"></a> 1 /\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00002" name="l00002"></a> 2 \*

<a id="l00003" name="l00003"></a> 3 \* (C) 2022 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00004" name="l00004"></a> 4 \*

<a id="l00005" name="l00005"></a> 5 \* Restricted Rights Legend

<a id="l00006" name="l00006"></a> 6 \*

<a id="l00007" name="l00007"></a> 7 \* Use, duplication, or disclosure of this

<a id="l00008" name="l00008"></a> 8 \* software and its documentation by the

<a id="l00009" name="l00009"></a> 9 \* Government is subject to restrictions as

<a id="l00010" name="l00010"></a> 10 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00011" name="l00011"></a> 11 \* the Rights in Technical Data and Computer

<a id="l00012" name="l00012"></a> 12 \* Software clause at 52.227-7013.

<a id="l00013" name="l00013"></a> 13 \*

<a id="l00014" name="l00014"></a> 14 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

<a id="l00015" name="l00015"></a> 15 \*/

<a id="l00016" name="l00016"></a> 16 

<a id="l00024" name="l00024"></a> 24 \#ifndef \_\_\_DVS\_LOGGER\_VERBOSE\_CONCRETE\_H\_\_\_

<a id="l00025" name="l00025"></a> 25 \#define \_\_\_DVS\_LOGGER\_VERBOSE\_CONCRETE\_H\_\_\_

<a id="l00026" name="l00026"></a> 26 

<a id="l00027" name="l00027"></a> 27 \#include "[logger\_interface.h](logger__interface_8h.xhtml)"

<a id="l00028" name="l00028"></a> 28 \#include "[dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml)"

<a id="l00029" name="l00029"></a> 29 \#include &lt;stdarg.h&gt;

<a id="l00030" name="l00030"></a> 30 \#include &lt;cstdio&gt;

<a id="l00031" name="l00031"></a> 31 

<a id="l00032" name="l00032"></a> 32 namespace DVS

<a id="l00033" name="l00033"></a> 33 {

<a id="l00034" name="l00034"></a> 34 

<a id="l00039" name="l00039"></a>[ 39](class_d_v_s_1_1_logger_verbose.xhtml) class [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml) : public [ILogger](class_d_v_s_1_1_i_logger.xhtml)

<a id="l00040" name="l00040"></a> 40 {

<a id="l00041" name="l00041"></a> 41 public:

<a id="l00042" name="l00042"></a> 42 

<a id="l00049" name="l00049"></a>[ 49](class_d_v_s_1_1_logger_verbose.xhtml#a88a3288c8d7f87bb5a3574fcc8909188) [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#a88a3288c8d7f87bb5a3574fcc8909188)(void* user_data, [dvs\_verbosity](dynamic__visualization__store__enums_8h.xhtml#aafcfd80cd55c92c53106bb56fdaf026d) level, [dvs\_log\_func](dynamic__visualization__store__api_8h.xhtml#a80c7c60e9cd61fcc0a0aacac09d66947) func)

<a id="l00050" name="l00050"></a> 50 : _user_data(user_data), _level(level), _func(func)

<a id="l00051" name="l00051"></a> 51 {}

<a id="l00052" name="l00052"></a> 52 

<a id="l00057" name="l00057"></a>[ 57](class_d_v_s_1_1_logger_verbose.xhtml#aa6d1b38cbd0f33a3238aae16a6db151e) virtual [~LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#aa6d1b38cbd0f33a3238aae16a6db151e)() = default; // make dtor virtual

<a id="l00058" name="l00058"></a> 58 

<a id="l00063" name="l00063"></a>[ 63](class_d_v_s_1_1_logger_verbose.xhtml#a2cf7775542558791b4d8b8654d9175ea) [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#a2cf7775542558791b4d8b8654d9175ea)([LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp;&amp;) = default; 

<a id="l00069" name="l00069"></a>[ 69](class_d_v_s_1_1_logger_verbose.xhtml#a5b201dab3f2e8edf67c43b9c23977f8b) [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp; [operator=](class_d_v_s_1_1_logger_verbose.xhtml#a5b201dab3f2e8edf67c43b9c23977f8b)([LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp;&amp;) = default;

<a id="l00074" name="l00074"></a>[ 74](class_d_v_s_1_1_logger_verbose.xhtml#af873ff781cc7ef4e0bcbfa30e05a088d) [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#af873ff781cc7ef4e0bcbfa30e05a088d)(const [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp;) = default;

<a id="l00080" name="l00080"></a>[ 80](class_d_v_s_1_1_logger_verbose.xhtml#a3ff9b828f93fd974a7a9706c5f7bde73) [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp; [operator=](class_d_v_s_1_1_logger_verbose.xhtml#a3ff9b828f93fd974a7a9706c5f7bde73)(const [LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)&amp;) = default;

<a id="l00081" name="l00081"></a> 81 

<a id="l00093" name="l00093"></a>[ 93](class_d_v_s_1_1_logger_verbose.xhtml#acf148c138e5b4c3a2bd00492966e2f00) void [log](class_d_v_s_1_1_logger_verbose.xhtml#acf148c138e5b4c3a2bd00492966e2f00)(int level, const char* msg, ...) override

<a id="l00094" name="l00094"></a> 94  {

<a id="l00095" name="l00095"></a> 95 if (_func &amp;&amp; (level &lt;= _level))

<a id="l00096" name="l00096"></a> 96 {

<a id="l00097" name="l00097"></a> 97 char buffer[1024];

<a id="l00098" name="l00098"></a> 98 va_list args;

<a id="l00099" name="l00099"></a> 99 va_start (args, msg);

<a id="l00100" name="l00100"></a> 100 vsnprintf(buffer, 1024, msg, args);

<a id="l00101" name="l00101"></a> 101 va_end (args);

<a id="l00102" name="l00102"></a> 102 _func(_user_data, buffer);

<a id="l00103" name="l00103"></a> 103 }

<a id="l00104" name="l00104"></a> 104 }

<a id="l00105" name="l00105"></a> 105 

<a id="l00110" name="l00110"></a>[ 110](class_d_v_s_1_1_logger_verbose.xhtml#a37d5bb525097d06ebc878a673da7029e) void [release](class_d_v_s_1_1_logger_verbose.xhtml#a37d5bb525097d06ebc878a673da7029e)() override

<a id="l00111" name="l00111"></a> 111  {

<a id="l00112" name="l00112"></a> 112 delete this;

<a id="l00113" name="l00113"></a> 113 }

<a id="l00114" name="l00114"></a> 114 

<a id="l00115" name="l00115"></a> 115 private:

<a id="l00116" name="l00116"></a> 116 

<a id="l00117" name="l00117"></a> 117 void* _user_data;

<a id="l00118" name="l00118"></a> 118 [dvs\_verbosity](dynamic__visualization__store__enums_8h.xhtml#aafcfd80cd55c92c53106bb56fdaf026d) _level;

<a id="l00119" name="l00119"></a> 119 [dvs\_log\_func](dynamic__visualization__store__api_8h.xhtml#a80c7c60e9cd61fcc0a0aacac09d66947) _func;

<a id="l00120" name="l00120"></a> 120 };

<a id="l00121" name="l00121"></a> 121 }

<a id="l00122" name="l00122"></a> 122 

<a id="l00123" name="l00123"></a> 123 \#endif //\_\_\_DVS\_LOGGER\_VERBOSE\_CONCRETE\_H\_\_\_

[DVS::ILogger](class_d_v_s_1_1_i_logger.xhtml)

Interface for a logger to be used by DVS::IClient.

**Definition:** [logger\_interface.h:35](logger__interface_8h_source.xhtml#l00034)



[DVS::LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml)

Logger class based on verbosity.

**Definition:** [logger\_verbose.h:40](logger__verbose_8h_source.xhtml#l00039)



[DVS::LoggerVerbose::LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#a2cf7775542558791b4d8b8654d9175ea)

LoggerVerbose(LoggerVerbose &amp;&amp;)=default

Support moving.



[DVS::LoggerVerbose::release](class_d_v_s_1_1_logger_verbose.xhtml#a37d5bb525097d06ebc878a673da7029e)

void release() override

Release this logger.

**Definition:** [logger\_verbose.h:110](logger__verbose_8h_source.xhtml#l00110)



[DVS::LoggerVerbose::operator=](class_d_v_s_1_1_logger_verbose.xhtml#a3ff9b828f93fd974a7a9706c5f7bde73)

LoggerVerbose &amp; operator=(const LoggerVerbose &amp;)=default



[DVS::LoggerVerbose::operator=](class_d_v_s_1_1_logger_verbose.xhtml#a5b201dab3f2e8edf67c43b9c23977f8b)

LoggerVerbose &amp; operator=(LoggerVerbose &amp;&amp;)=default



[DVS::LoggerVerbose::LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#a88a3288c8d7f87bb5a3574fcc8909188)

LoggerVerbose(void *user_data, dvs_verbosity level, dvs_log_func func)

Constructor.

**Definition:** [logger\_verbose.h:49](logger__verbose_8h_source.xhtml#l00049)



[DVS::LoggerVerbose::~LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#aa6d1b38cbd0f33a3238aae16a6db151e)

virtual ~LoggerVerbose()=default

Virtual DTOR.



[DVS::LoggerVerbose::log](class_d_v_s_1_1_logger_verbose.xhtml#acf148c138e5b4c3a2bd00492966e2f00)

void log(int level, const char *msg,...) override

Log a message to the logger.

**Definition:** [logger\_verbose.h:93](logger__verbose_8h_source.xhtml#l00093)



[DVS::LoggerVerbose::LoggerVerbose](class_d_v_s_1_1_logger_verbose.xhtml#af873ff781cc7ef4e0bcbfa30e05a088d)

LoggerVerbose(const LoggerVerbose &amp;)=default

Support copying.



[dynamic\_visualization\_store\_api.h](dynamic__visualization__store__api_8h.xhtml)

C API for using Dynamic Visualization Store.



[dvs\_log\_func](dynamic__visualization__store__api_8h.xhtml#a80c7c60e9cd61fcc0a0aacac09d66947)

void(* dvs_log_func)(void *, const char *)

Function pointer for logging methods.

**Definition:** [dynamic\_visualization\_store\_api.h:143](dynamic__visualization__store__api_8h_source.xhtml#l00143)



[dvs\_verbosity](dynamic__visualization__store__enums_8h.xhtml#aafcfd80cd55c92c53106bb56fdaf026d)

dvs_verbosity

Verbosity levels.

**Definition:** [dynamic\_visualization\_store\_enums.h:83](dynamic__visualization__store__enums_8h_source.xhtml#l00082)



[logger\_interface.h](logger__interface_8h.xhtml)

Logger Interface Class.