You are here: Part 10: RTI Distributed Logger > Enabling Distributed Logger in RTI Services

Enabling Distributed Logger in RTI Services

Many RTI components provide integrated support for Distributed Logger (check the component’s Release Notes) and include the Distributed Logger library in their distribution. To enable Distributed Logger in these components, modify their XML configuration file. In the <administration> section, add the <distributed_logger> tag as shown in this example:

<persistence_service name="default">
	<administration>
		<domain_id>10</domain_id>
		<distributed_logger>
			<enabled>true</enabled>
			<filter_level>DEBUG</filter_level>
			<queue_size>2048</queue_size>
			<thread>
				<priority>
					THREAD_PRIORITY_BELOW_NORMAL
				</priority>
				<stack_size>8192</stack_size>
				<cpu_list>
					<element>0</element>
					<element>1</element>
				</cpu_list>
				<cpu_rotation>
					THREAD_SETTINGS_CPU_NO_ROTATION
				</cpu_rotation>
			</thread>
		</distributed_logger>
	</administration>
	...
</persistence_service>

The tags supported within the <distributed_logger> tag are described in .

Distributed Logger Tags

Tags within <distributed_logger>

Description

Number of Tags Allowed

<enabled>

Controls whether or not Distributed Logger should be enabled at start up. This field is required.

Allowed values: TRUE or FALSE

1 (required)

<filter_level>

The filter level for the log messages to be sent. Distributed Logger uses the filter level to discard log messages before they can be sent from the application/service. This is the minimum log level that will be sent out over the network. For example, when using the NOTICE level, any INFO, DEBUG and TRACE-level log messages will be filtered out and not sent from the application/service to Connext DDS.

See important information in Relationship Between Service Verbosity and Filter Level.

Can be set to these values:

  • SILENT
  • FATAL
  • SEVERE
  • ERROR
  • WARNING
  • NOTICE
  • INFO
  • DEBUG
  • TRACE (most verbose level, default)

0 or 1

<queue_size>

The size of an internal message queue used to store log messages before they are written to DDS.

Default, 128 log messages.

0 or 1

<thread>

See .

0 or 1

 

Distributed Logger Thread Tags

Tags within <distributed_logger>/
<thread>

Description

Number of Tags Allowed

<cpu_list>

Each <element> specifies a processor on which the Distributed Logger thread may run.

<cpu_list>
    <element>value</element>
</cpu_list>

Only applies to platforms that support controlling CPU core affinity (see the RTI Connext DDS Core Libraries Platform Notes).

0 or 1

<cpu_rotation>

Determines how the CPUs in <cpu_list> will be used by the Distributed Logger thread. The value can be either:

  • THREAD_SETTINGS_CPU_NO_ROTATION
  • The thread can run on any listed processor, as determined by OS scheduling.

  • THREAD_SETTINGS_CPU_RR_ROTATION
  • The thread will be assigned a CPU from the list in round-robin order.

Only applies to platforms that support controlling CPU core affinity (see the RTI Connext DDS Core Libraries Platform Notes).

0 or 1

<mask>

A collection of flags used to configure threads of execution. Not all of these options may be relevant for all operating systems. May include these bits:

  • STDIO
  • FLOATING_POINT
  • REALTIME_PRIORITY
  • PRIORITY_ENFORCE

It can also be set to a combination of the above bits by using the “or” symbol (|), such as STDIO|FLOATING_POINT.

Default: MASK_DEFAULT

0 or 1

<priority>

Thread priority. The value can be specified as an unsigned integer or one of the following strings.

  • THREAD_PRIORITY_DEFAULT
  • THREAD_PRIORITY_HIGH
  • THREAD_PRIORITY_ABOVE_NORMAL
  • THREAD_PRIORITY_NORMAL
  • THREAD_PRIORITY_BELOW_NORMAL
  • THREAD_PRIORITY_LOW

When using an unsigned integer, the allowed range is platform-dependent.

0 or 1

<stack_size>

Thread stack size, specified as an unsigned integer or set to the string THREAD_STACK_SIZE_DEFAULT. The allowed range is platform-dependent.

0 or 1

© 2016 RTI