RTI Distributed Logger API Version 7.7.0
rti_dl_cpp.h
1/*
2 * (c) Copyright, Real-Time Innovations, 2011-2016.
3 * All rights reserved.
4 * No duplications, whole or partial, manual or electronic, may be made
5 * without express written permission. Any such copies, or
6 * revisions thereof, must display this notice unaltered.
7 * This code contains trade secrets of Real-Time Innovations, Inc.
8 */
9
10#ifndef rti_dl_cpp_h
11#define rti_dl_cpp_h
12
13
14/*e \file
15 * \brief RTI Distributed Logger classes and methods
16 */
17
18#include "rti_dl/rti_dl_dll_cpp.h"
19#include "rti_dl/rti_dl_c.h"
20
21#include "dds_cpp/dds_cpp_domain.h"
22
23
24class RTI_DLDistLogger; /* Forward declaration */
25
26/*e
27 * \class RTI_DLOptions
28 * \ingroup RTI_DL_DistLogger_Module
29 * \brief This class contains RTI Distributed Logger configurable options.
30 *
31 * Use this API to customize RTI Distributed Logger to adapt it to your needs.
32 * Assign the newly created \ref RTI_DLOptions object to RTI Distributed Logger
33 * singleton before calling to \ref RTI_DLDistLogger::getInstance.
34 */
35class RTIDLCPPDllExport RTI_DLOptions{
36 friend class RTI_DLDistLogger;
37public:
38 /*e
39 * \brief Default constructor
40 *
41 * Allocates memory for a RTI_DLOptions class and sets the default values needed to create the DL.
42 * \see ~RTI_DLOptions()
43 */
45
46 /*e
47 * \brief Default destructor
48 *
49 * Frees RTI_DLOptions class. Checks whether the pointer exists or not.
50 * If \c domainParticipant was assigned, its memory is not released.
51 */
53
54 /*e
55 * \brief Gets current C DomainParticipant.
56 *
57 * If a customized DomainParticipant have been set, this function returns a
58 * pointer to the internal C DomainParticipant that will be used to create
59 * DDS entities (Topics, Publishers, Subscribers, DataWriters, and
60 * DataReaders) needed by RTI Distributed Logger.
61 * The default value is NULL.
62 * \return Pointer to the DDS_DomainParticipant contained in the class.
63 * Otherwise, NULL.
64 */
65 DDS_DomainParticipant * getCDomainParticipantI();
66
67 /*e
68 * \brief Sets current DomainParticipant.
69 *
70 * There are several use cases in which you may want to use your own
71 * DomainParticipant to create RTI Distributed Logger internal DDS
72 * entities. By calling this function, you will have control of the
73 * DomainParticipant used by RTI Distributed Logger. Once assigned,
74 * \c \b domainParticipant will be used to create the DDS entities (Topics,
75 * Publishers, Subscribers, DataWriters, & DataReaders) needed by RTI
76 * Distributed Logger.
77 *
78 * When the DomainParticipant is set to a non-NULL value
79 * it is the user's responsibility to handle the memory
80 * associated with it.
81 *
82 * \param [in] domainParticipant Pointer to a valid DDS_DomainParticipant
83 * \post Memory must be released by the user \b after finalizing RTI
84 * Distributed Logger using \ref RTI_DLDistLogger::finalizeInstance.
85 */
86 DDS_ReturnCode_t setDomainParticipant(DDSDomainParticipant * domainParticipant);
87
88 /*e
89 * \brief Sets current DomainParticipant.
90 *
91 * If true, remote administration Topics will be created and
92 * used. If false, they will not be created. The default value
93 * is true.
94 * \return true if the Remote Administration is enabled. Otherwise false.
95 */
97
98 /*e
99 * \brief Enables or disables remote administration
100 *
101 * Sets remote administration of the Topics to the value passed as
102 * parameter.
103 * \param [in] enabled Boolean indicating new remote administration value.
104 */
105 DDS_ReturnCode_t setRemoteAdministrationEnabled(bool enabled);
106
107 /*e
108 * \brief Gets the log filter level.
109 *
110 * Supported Filter Levels: See the IDL file provided with RTI Distributed
111 * Logger (\ref_url_dl_idl)
112 *
113 * The default value is RTI_DL_INFO_LEVEL.
114 * See setFilterLevel() for more information on filter levels.
115 *
116 * \return integer containing the log filter level of the options.
117 * \see RTI_DLDistLogger::setFilterLevel
118 */
120
121 /*e
122 * \brief Sets the log filter level.
123 *
124 * Filtering controls what type of log messages are sent.
125 * This enables filtering on the \em sending side (in the application using
126 * RTI Distributed Logger). You can also enable filtering on the \em
127 * receiving side (such as in a tool that receives log messages, like RTI
128 * Admin Console or RTI Monitor).
129 *
130 * Supported Filter Levels: See the IDL file provided with RTI Distributed
131 * Logger (\ref_url_dl_idl).
132 * The default value is RTI_DL_INFO_LEVEL.
133 *
134 * \param [in] filterLevel The log filter level of the options (see above).
135 * \return Error code. DDS_RETCODE_OK if everything goes as planned.
136 * \see RTI_DLDistLogger::setFilterLevel
137 */
138 DDS_ReturnCode_t setFilterLevel(int filterLevel);
139
140 /*e
141 * \brief Gets the current Domain ID
142 *
143 * Returns the Domain ID to be used by RTI Distributed Logger. This value is
144 * only used if \ref setDomainParticipant has NOT been called. Otherwise,
145 * the Domain ID used is the one of the DomainParticipant assigned.
146 *
147 * The default value is 0.
148 * \return Integer containing the DDS Domain ID where RTI Distributed
149 * Logger instance will be created.
150 */
152
153 /*e
154 * \brief Sets the current Domain ID
155 *
156 * Updated the Domain ID to be used by RTI Distributed Logger. This value is
157 * only used if \ref setDomainParticipant has NOT been called. Otherwise,
158 * the Domain ID used is the one of the DomainParticipant assigned.
159 *
160 * The default value is 0.
161 * \param [in] domainId Int representing a DDS Domain ID. Max value: 250
162 * \return DDS_RETCODE_OK if the operation was a success.
163 */
164 DDS_ReturnCode_t setDomainId(int domainId);
165
166 /*e
167 * \brief Gets the Qos Library that will be used to create to RTI
168 * Distributed Logger
169 *
170 * The QoS library name to use when creating DDS entities. It is up to the
171 * application to ensure that this library is available at run time for RTI
172 * Distributed Logger to use. The default value is "".
173 * \return String containing the current Qos Library. Do not
174 * modify the content of this pointer directly nor delete it.
175 */
177
178 /*e
179 * \brief Sets the Qos Library that will be used to create to RTI
180 * Distributed Logger
181 *
182 * The QoS library name to use when creating DDS entities. It is up to the
183 * application to ensure that this library is available at run time for the
184 * Distributed Logger to use.
185 * \param [in] qosLibrary String containing the new Qos Library. A copy of
186 * the string is made.
187 * \return DDS_RETCODE_OK if the operation was a success.
188 */
189 DDS_ReturnCode_t setQosLibrary(const char *qosLibrary);
190
191 /*e
192 * \brief Gets the Qos Profile that will be used to create to RTI
193 * Distributed Logger
194 *
195 * The QoS profile name to use when creating DDS entities. It is up to the
196 * application to ensure that this profile is available at run time for the
197 * Distributed Logger to use. The default value is "".
198 * \return String containing the current Qos Profile. Do not modify
199 * the content of this pointer directly nor delete it.
200 */
202
203 /*e
204 * \brief Sets the Qos Profile that will be used to create to RTI
205 * Distributed Logger
206 *
207 * The QoS profile name to use when creating DDS entities. It is up to the
208 * application to ensure that this profile is available at run time for the
209 * Distributed Logger to use.
210 * \param [in] qosProfile String containing the new Qos Profile. A copy of
211 * the string is made.
212 * \return DDS_RETCODE_OK if the operation was a success.
213 */
214 DDS_ReturnCode_t setQosProfile(const char *qosProfile);
215
216 /*e
217 * \brief Gets the maximum queue size that will be assigned to RTI
218 * Distributed Logger
219 *
220 * This field controls the size of the queue used to temporarily store log
221 * messages from the application until they can be written out to
222 * DDS. The default value is RTI_DL_DEFAULT_QUEUE_SIZE.
223 * \return Integer containing the current maximum queue size.
224 */
226 /*e
227 * \brief Sets the maximum queue size that will be assigned to RTI
228 * Distributed Logger
229 *
230 * This field controls the size of the queue used to temporarily store log
231 * messages from the application until they can be written out to
232 * DDS.
233 * \param [in] queueSize Integer containing the new maximum queue size.
234 * \return DDS_RETCODE_OK if the operation was a success.
235 */
236 DDS_ReturnCode_t setQueueSize(int queueSize);
237
238 /*e
239 * \brief Get the thread settings of the publishing threadthat will be
240 * created by RTI Distributed Logger.
241 *
242 * This field contains general settings of the publishing thread in
243 * Distributed Logger, like the thread priority, stack size, and other
244 * settings.
245 * \return threadPriority Integer containing the current thread priority.
246 */
247 struct DDS_ThreadSettings_t * getThreadSettings();
248
249 /*e
250 * \brief Sets the settings of the publishing thread that will be created
251 * by RTI Distributed Logger
252 *
253 * This parameter is used to control thread parameters such as priority, stack
254 * size, and other settings. These settings will only affect the
255 * publishing thread created by RTI Distributed Logger.
256 * \param [in] threadSettings A valid DDS_ThreadSettings_t struct with the
257 * settings for Distributed Logger's write thread.
258 * \return DDS_RETCODE_OK if the operation was a success.
259 */
260 DDS_ReturnCode_t setThreadSettings(const struct DDS_ThreadSettings_t * threadSettings);
261
262 /*e
263 * \brief Gets the application kind that will be associated with RTI
264 * Distributed Logger
265 *
266 * This char pointer is sent along on the state Topic and can help identify
267 * different applications within a system. You can use this field however
268 * you think it will help you most. The default value is "".
269 *
270 * \return String containing the current application kind.
271 */
273
274 /*e
275 * \brief Sets the application kind that will be associated with RTI
276 * Distributed Logger
277 *
278 * This string is sent along on the state Topic and can help identify
279 * different applications within a system. You can use this field however
280 * you think it will help you most. The default value is "".
281 * \param [in] applicationKind String containing the new application kind.
282 * The maximum length of the string is 255.
283 */
284 DDS_ReturnCode_t setApplicationKind(const char *applicationKind);
285
286 /*e
287 * \brief Gets the current value of echoToStdout
288 *
289 * If true, Distributed Logger prints the log messages received to the
290 * stdout. The default value is TRUE.
291 * \return Boolean to the current echoToStdout value
292 */
294
295 /*e
296 * \brief Sets the value of echoToStdout
297 *
298 * If true, Distributed Logger prints the log messages received to the
299 * stdout. The default value is TRUE.
300 * \param [in] echoToStdout New value of set self.echoToStdout.
301 */
302 DDS_ReturnCode_t setEchoToStdout(bool echoToStdout);
303
304 /*e
305 * \brief Indicates whether Distributed Logger should also log all
306 * messages produced by infrastructure code automatically.
307 *
308 * If true, messages produced by either the middleware or the tools will
309 * be forwarded to Distributed Logger.
310 * \return Boolean to the current LogInfrastructureMessages value.
311 */
313
314 /*e
315 * \brief Enables or disables automatic logging of infrastructure messages
316 *
317 * If true, messages produced by either the middleware or the tools will
318 * be forwarded to Distributed Logger. In this mode Distributed Logger uses
319 * NDDS_Config_Logger_set_output_device() API to receive messages from the
320 * middleware. Hence any device previously registered with NDDSConfigLogger's
321 * set_output_device() API will be unregistered. Similarly Distributed
322 * Logger will stop logging infrastructure messages if the
323 * set_output_device() API is used to register a new device after the
324 * creation of the Distributed Logger instance.
325 *
326 * \param [in] log Boolean indicating whether to enable this feature.
327 * \return DDS_RETCODE_OK if the operation was a success.
328 */
329 DDS_ReturnCode_t setLogInfrastructureMessages(bool log);
330
331
332private:
333 /*i
334 * \brief This variable contains the real options.
335 *
336 * The RTI_DLOptions class is just a wrapper to the C implementation,
337 * so this variable, created in the default constructor, is the one
338 * containing the information. Check C Documentation for further details.
339 */
340 struct RTI_DL_Options *_impl;
341
342 /*i
343 * \brief Wrapping constructor.
344 * Specific constructor that uses already created configuration options.
345 * Its visibility is private, and it's oriented for internal usage.
346 */
347 RTI_DLOptions(struct RTI_DL_Options * options);
348};
349
350
351/*e
352 * \class RTI_DLUtility
353 * \ingroup RTI_DL_DistLogger_Module
354 * \brief Commodity functions for using RTI Distributed Logger
355 */
356class RTIDLCPPDllExport RTI_DLUtility {
357public:
358 /*e
359 * \brief Blocks the calling thread for the specified duration
360 *
361 * Note that the achievable resolution of sleep is OS-dependent.
362 * That is, do not assume that you can sleep for 1 ms just
363 * because you can specify a 1-ms sleep duration via the API.
364 * The sleep resolution on most operating systems is usually 10 ms or greater.
365 *
366 * \param [in] msec Sleep duration in milliseconds.
367 */
368 static void sleep(int msec);
369};
370
371/*e
372 * \defgroup RTI_DL_DistLogger_Module RTI Distributed Logger API
373 * \brief Main API to use RTI Distributed Logger singleton.
374 */
375/*e
376 * \class RTI_DLDistLogger
377 * \ingroup RTI_DL_DistLogger_Module
378 *
379 * \brief This class contains RTI Distributed Logger singleton and the methods
380 * to configure and use it.
381
382 * This class is a <b>singleton</b>, so only one copy will be created.
383 * Use the \ref RTI_DLOptions class to customize the singleton \b BEFORE
384 * creating it.
385 */
386
387class RTIDLCPPDllExport RTI_DLDistLogger {
388private:
389 /*i
390 * \brief This variable contains the actual RTI Distributed Logger
391 * singleton.
392 *
393 * The RTI_DLDistLogger class is just a wrapper to the C implementation,
394 * so this variable, created in the default constructor, is the one
395 * containing the information. Check C Documentation for further details.
396 */
397 struct RTI_DL_DistLogger *_impl;
398
399 /*i
400 * \brief RTI Distributed Logger singleton.
401 *
402 * RTI_DLDistLogger is a singleton. This static variable is created
403 * the first time \ref getInstance() is called. It uses the default
404 * options unless \ref setOptions is called BEFORE creating the DL.
405 */
406 static RTI_DLDistLogger *instance;
407
408 /*i
409 * \brief Default constructor
410 *
411 * Creates the singleton.
412 * It's called when getInstance is called and _impl is NULL.
413 */
415
416 /*i
417 * \brief Default destructor
418 *
419 * Destroys the singleton.
420 * It's called when finalizeInstance is called.
421 */
423
424public:
425 /*e
426 * \brief Provides access to the RTI_DL_DistLogger singleton.
427 *
428 * This method provides access to the singleton instance of the RTI_DL_DistLogger. If
429 * the instance does not exist, it will be created. Note that no change in
430 * options is allowed after the singleton is created.
431 * \return The singleton instance of the RTI_DL_DistLogger.
432 */
434
435 /*e
436 * \brief Sets the filter level for the singleton.
437 *
438 * Filtering controls what type of log messages are sent.
439 * This enables filtering on the \em sending side (in the application using
440 * Distributed Logger). You can also enable filtering on the \em receiving
441 * side (such as in a tool that receives log messages, like RTI Admin
442 * Console or RTI Monitor).
443 *
444 * Supported Filter Levels: See the table below.
445 * The default value is RTI_DL_INFO_LEVEL.
446 * The default value is RTI_DL_INFO_LEVEL.
447 *
448 * Or see the IDL file provided with Distributed Logger
449 * (file: \ref_url_dl_idl).In the IDL file, there are language-specific bindings.
450 * Prepend the appropriate binding to the filter level shown in the IDL.
451 * For example, one of the filter levels in the IDL is INFO_LEVEL.
452 * To refer to this filter level in C++, use RTI_DL_INFO_LEVEL.
453 *
454 * Log messages up to and including the specified filter level will pass
455 * through the filter and be sent on the network. For example, the WARNING
456 * level allows log messages up to and including the WARNING level (FATAL,
457 * SEVERE, ERROR, and WARNING) to be sent; any other log messages with
458 * numerically higher filter levels (INFO, DEBUG, and TRACE) will be
459 * filtered out and not sent.
460 *
461 * \param [in] newLevel The new filter level.
462 * \return Error code. DDS_RETCODE_OK if everything goes as planned.
463 *
464 * The following table shows how RTI Connext DDS log levels map to RTI
465 * Distributed Logger log filter levels.
466 *
467 * Not all RTI Distributed Logger levels appear in this table because there
468 * is not a one-to-one mapping between RTI Connext DDS and RTI Distributed
469 * Logger levels (there are more levels in RTI Distributed Logger).
470 * You can obtain the filter level using a constant defined in the Distributed
471 * Logger IDL file or a getter function in the Distributed Logger API.
472 *
473 * <CENTER><TABLE>
474 * <CAPTION><EM>Filter Levels</EM></CAPTION>
475 * <TR>
476 * <TH> Connext DDS API constant </TH>
477 * <TH> Distributed Logger IDL constant </TH>
478 * <TH> Distributed Logger API getter </TH>
479 * </TR>
480 * <TR>
481 * <TD>NDDS_CONFIG_LOG_FATAL_ERROR</TD>
482 * <TD>RTI_DL_FATAL_LEVEL</TD>
483 * <TD>\ref getFatalLogLevel</TD>
484 * </TR>
485 * <TR>
486 * <TD>NDDS_CONFIG_LOG_LEVEL_ERROR</TD>
487 * <TD>RTI_DL_ERROR_LEVEL</TD>
488 * <TD>\ref getErrorLogLevel</TD>
489 * </TR>
490 * <TR>
491 * <TD>NDDS_CONFIG_LOG_LEVEL_WARNING</TD>
492 * <TD>RTI_DL_WARNING_LEVEL</TD>
493 * <TD>\ref getWarningLogLevel</TD>
494 * </TR>
495 * <TR>
496 * <TD>NDDS_CONFIG_LOG_LEVEL_STATUS_LOCAL</TD>
497 * <TD>RTI_DL_NOTICE_LEVEL</TD>
498 * <TD>\ref getNoticeLogLevel</TD>
499 * </TR>
500 * <TR>
501 * <TD>NDDS_CONFIG_LOG_LEVEL_STATUS_REMOTE</TD>
502 * <TD>RTI_DL_INFO_LEVEL</TD>
503 * <TD>\ref getInfoLogLevel</TD>
504 * </TR>
505 * <TR>
506 * <TD>NDDS_CONFIG_LOG_LEVEL_DEBUG</TD>
507 * <TD>RTI_DL_DEBUG_LEVEL</TD>
508 * <TD>\ref getDebugLogLevel</TD>
509 * </TR>
510 * </TABLE></CENTER>
511 *
512 */
513 DDS_ReturnCode_t setFilterLevel(DDS_Long newLevel);
514
515 /*e
516 * \brief Assigns configurable options to RTI Distributed Logger before its
517 * creation.
518 *
519 * Assigns the values in the \c options to the \ref RTI_DLDistLogger
520 * singleton \b before its creation. If the singleton was already created,
521 * this function has no effect.
522 *
523 * \param [in] options The new options to be assigned to the
524 * \ref RTI_DLDistLogger singleton.
525 * \pre The \b singleton must be NULL.
526 * \return RTI_TRUE if everything went as planned. RTI_FALSE if RTI
527 * Distributed Logger already existed.
528 */
529 static bool setOptions(RTI_DLOptions& options);
530
531 /*e
532 * \brief Sets PrintFormat of RTI Logger to the provided value.
533 *
534 * This method is mostly a pass-through to the appropriate call in RTI
535 * DDS library, but it also has the benefit of keeping the state of RTI
536 * Logger and RTI Distributed Logger in sync.
537 * \param [in] logPrintFormat The new PrintFormat.
538 * \return RTI_TRUE if everything went as planned.
539 */
540 bool setRTILoggerPrintFormat(NDDS_Config_LogPrintFormat logPrintFormat);
541
542 /*e
543 * \brief Updates the LogCategory and the LogVerbosity in RTI Logger to the
544 * provided value.
545 *
546 * This method is mostly a pass-through to the appropriate call in RTI
547 * DDS library, but it also has the benefit of keeping the state of RTI
548 * Logger and RTI Distributed Logger in sync.
549 * \param [in] category The category for which to set the verbosity.
550 * \param [in] verbosity The new verbosity level for the category.
551 */
552 void setRTILoggerVerbosityByCategory(NDDS_Config_LogCategory category,
553 NDDS_Config_LogVerbosity verbosity);
554
555 /*e
556 * \brief Logs a message at the specified level and with the specified
557 * category.
558 *
559 * \param [in] logLevel The level of the log message.
560 * \param [in] message The message to log.
561 * \param [in] category The category of the log message.
562 */
563 void logMessageWithLevelCategory(int logLevel, const char *message, const char *category);
564
565 /*e
566 * \brief Performs the same function as \ref logMessageWithLevelCategory
567 * except that it also allows specification of the message timestamp.
568 *
569 * \param [in] params Parameters.
570 */
572
573 /*e
574 * \brief Logs a fatal message
575 *
576 * The message received is logged using the default category and the
577 * RTI_DL_FATAL_LEVEL log level.
578
579 * \param [in] message The message to log.
580 */
581 void fatal(const char *message);
582
583 /*e
584 * \brief Logs a severe message
585 *
586 * The message received is logged using the default category and the
587 * RTI_DL_SEVERE_LEVEL log level.
588
589 * \param [in] message The message to log.
590 */
591 void severe(const char *message);
592
593 /*e
594 * \brief Logs a error message
595 *
596 * The message received is logged using the default category and the
597 * RTI_DL_ERROR_LEVEL log level.
598
599 * \param [in] message The message to log.
600 */
601 void error(const char *message);
602
603 /*e
604 * \brief Logs a warning message
605 *
606 * The message received is logged using the default category and the
607 * RTI_DL_WARNING_LEVEL log level.
608
609 * \param [in] message The message to log.
610 */
611 void warning(const char *message);
612
613 /*e
614 * \brief Logs a notice message
615 *
616 * The message received is logged using the default category and the
617 * RTI_DL_NOTICE_LEVEL log level.
618
619 * \param [in] message The message to log.
620 */
621 void notice(const char *message);
622
623 /*e
624 * \brief Logs a info message
625 *
626 * The message received is logged using the default category and the
627 * RTI_DL_INFO_LEVEL log level.
628
629 * \param [in] message The message to log.
630 */
631 void info(const char *message);
632
633 /*e
634 * \brief Logs a debug message
635 *
636 * The message received is logged using the default category and the
637 * RTI_DL_DEBUG_LEVEL log level.
638
639 * \param [in] message The message to log.
640 */
641 void debug(const char *message);
642
643 /*e
644 * \brief Logs a trace message
645 *
646 * The message received is logged using the default category and the
647 * RTI_DL_TRACE_LEVEL log level.
648
649 * \param [in] message The message to log.
650 */
651 void trace(const char *message);
652
653 /*e
654 * \brief Logs a message
655 *
656 * The message received is logged using the default category and the
657 * given log level.
658
659 * \param [in] logLevel The level of the log message.
660 * \param [in] message The message to log.
661 */
662 void log(int logLevel, const char *message);
663
664 /*e
665 * \brief Finalizes and delete the RTI_DL_DistLogger singleton.
666 *
667 * Unset the connections with DDS, frees memory and set singleton to NULL.
668 */
670
671 /*e
672 * \brief Return Fatal log level.
673 *
674 * \return Fatal log level.
675 */
677
678 /*e
679 * \brief Return Error log level.
680 *
681 * \return Error log level.
682 */
684
685 /*e
686 * \brief Return Warning log level.
687 *
688 * \return Warning log level.
689 */
691
692 /*e
693 * \brief Return Notice log level.
694 *
695 * \return Notice log level.
696 */
698
699 /*e
700 * \brief Return Info log level.
701 *
702 * \return Info log level.
703 */
704 DDS_Long getInfoLogLevel();
705
706 /*e
707 * \brief Return Debug log level.
708 *
709 * \return Debug log level.
710 */
712
713};
714
715
716
717#endif /* rti_dl_cpp_h */
This class contains RTI Distributed Logger singleton and the methods to configure and use it.
Definition: rti_dl_cpp.h:387
DDS_Long getInfoLogLevel()
Return Info log level.
void log(int logLevel, const char *message)
Logs a message.
void logMessageWithLevelCategory(int logLevel, const char *message, const char *category)
Logs a message at the specified level and with the specified category.
DDS_Long getDebugLogLevel()
Return Debug log level.
DDS_ReturnCode_t setFilterLevel(DDS_Long newLevel)
Sets the filter level for the singleton.
DDS_Long getFatalLogLevel()
Return Fatal log level.
void setRTILoggerVerbosityByCategory(NDDS_Config_LogCategory category, NDDS_Config_LogVerbosity verbosity)
Updates the LogCategory and the LogVerbosity in RTI Logger to the provided value.
static bool setOptions(RTI_DLOptions &options)
Assigns configurable options to RTI Distributed Logger before its creation.
void finalizeInstance()
Finalizes and delete the RTI_DL_DistLogger singleton.
bool setRTILoggerPrintFormat(NDDS_Config_LogPrintFormat logPrintFormat)
Sets PrintFormat of RTI Logger to the provided value.
void debug(const char *message)
Logs a debug message.
void fatal(const char *message)
Logs a fatal message.
void logMessageWithParams(const struct RTI_DL_DistLogger_MessageParams &params)
Performs the same function as logMessageWithLevelCategory except that it also allows specification of...
void trace(const char *message)
Logs a trace message.
DDS_Long getNoticeLogLevel()
Return Notice log level.
void notice(const char *message)
Logs a notice message.
void error(const char *message)
Logs a error message.
DDS_Long getErrorLogLevel()
Return Error log level.
static RTI_DLDistLogger * getInstance()
Provides access to the RTI_DL_DistLogger singleton.
DDS_Long getWarningLogLevel()
Return Warning log level.
void info(const char *message)
Logs a info message.
void severe(const char *message)
Logs a severe message.
void warning(const char *message)
Logs a warning message.
This class contains RTI Distributed Logger configurable options.
Definition: rti_dl_cpp.h:35
char * getApplicationKind()
Gets the application kind that will be associated with RTI Distributed Logger.
DDS_ReturnCode_t setDomainId(int domainId)
Sets the current Domain ID.
DDS_ReturnCode_t setQueueSize(int queueSize)
Sets the maximum queue size that will be assigned to RTI Distributed Logger.
int getFilterLevel()
Gets the log filter level.
DDS_DomainParticipant * getCDomainParticipantI()
Gets current C DomainParticipant.
DDS_ReturnCode_t setApplicationKind(const char *applicationKind)
Sets the application kind that will be associated with RTI Distributed Logger.
char * getQosLibrary()
Gets the Qos Library that will be used to create to RTI Distributed Logger.
DDS_ReturnCode_t setFilterLevel(int filterLevel)
Sets the log filter level.
DDS_ReturnCode_t setThreadSettings(const struct DDS_ThreadSettings_t *threadSettings)
Sets the settings of the publishing thread that will be created by RTI Distributed Logger.
bool isRemoteAdministrationEnabled()
Sets current DomainParticipant.
char * getQosProfile()
Gets the Qos Profile that will be used to create to RTI Distributed Logger.
int getQueueSize()
Gets the maximum queue size that will be assigned to RTI Distributed Logger.
bool getLogInfrastructureMessages()
Indicates whether Distributed Logger should also log all messages produced by infrastructure code aut...
DDS_ReturnCode_t setEchoToStdout(bool echoToStdout)
Sets the value of echoToStdout.
bool getEchoToStdout()
Gets the current value of echoToStdout.
DDS_ReturnCode_t setRemoteAdministrationEnabled(bool enabled)
Enables or disables remote administration.
DDS_ReturnCode_t setLogInfrastructureMessages(bool log)
Enables or disables automatic logging of infrastructure messages.
~RTI_DLOptions()
Default destructor.
DDS_ReturnCode_t setDomainParticipant(DDSDomainParticipant *domainParticipant)
Sets current DomainParticipant.
DDS_ReturnCode_t setQosLibrary(const char *qosLibrary)
Sets the Qos Library that will be used to create to RTI Distributed Logger.
struct DDS_ThreadSettings_t * getThreadSettings()
Get the thread settings of the publishing threadthat will be created by RTI Distributed Logger.
RTI_DLOptions()
Default constructor.
int getDomainId()
Gets the current Domain ID.
DDS_ReturnCode_t setQosProfile(const char *qosProfile)
Sets the Qos Profile that will be used to create to RTI Distributed Logger.
Commodity functions for using RTI Distributed Logger.
Definition: rti_dl_cpp.h:356
static void sleep(int msec)
Blocks the calling thread for the specified duration.
Input parameters for RTI_DL_DistLogger_logMessageWithParams.
Definition: rti_dl_c.h:306
Struct defining RTI Distributed Logger singleton.
This struct contains all RTI Distributed Logger's configurable options.