Skip to content

Commit d412eee

Browse files
add doc for "--log-file-name" command line argument. (#4087)
* add doc for "--log-file-name" command line argument. Signed-off-by: Tomoya Fujita <[email protected]> Co-authored-by: Katherine Scott <[email protected]>
1 parent 19aefd7 commit d412eee

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

source/How-To-Guides/Node-arguments.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ The following example will both change the node name and remap a topic (node and
6767
Logger configuration
6868
--------------------
6969

70-
See ``--log-level`` argument usage in :doc:`the logging page <../Tutorials/Demos/Logging-and-logger-configuration>`.
70+
The per-node logging level can be specified using the ``--log-level`` command line argument.
71+
The executable log file name prefix, which includes all nodes in the executable, can be specified using ``--log-file-name`` command line argument.
72+
For more information please see :doc:`the logging page <../Tutorials/Demos/Logging-and-logger-configuration>`.
7173

7274
Parameters
7375
----------

source/Releases/Release-Jazzy-Jalisco.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,20 @@ Release Timeline
9494

9595
.. [1] The ``ros_base`` variant is described in `REP 2001 (ros-base) <https://www.ros.org/reps/rep-2001.html#ros-base>`_.
9696
.. [2] The ``desktop`` variant is described in `REP 2001 (desktop-variants) <https://www.ros.org/reps/rep-2001.html#desktop-variants>`_.
97+
98+
New features in this ROS 2 release
99+
----------------------------------
100+
101+
``ros2cli``
102+
^^^^^^^^^^^
103+
104+
``--log-file-name`` command line argument
105+
"""""""""""""""""""""""""""""""""""""""""
106+
107+
It is now possible to use ``--log-file-name`` command line argument to specify the log file name prefix.
108+
109+
.. code-block:: bash
110+
111+
ros2 run demo_nodes_cpp talker --ros-args --log-file-name filename
112+
113+
See https://github.com/ros2/ros2cli/issues/856 for more information.

source/Tutorials/Demos/Logging-and-logger-configuration.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,3 +523,15 @@ Then run:
523523
.. code-block:: bash
524524
525525
ros2 run logging_demo logging_demo_main
526+
527+
Setting the log file name prefix
528+
--------------------------------
529+
530+
By default, the log file name is based on the executable file name followed by process ID and system timestamp on file creation.
531+
You can change the log file name prefix to one of your choice using the ``--log-file-name`` command line argument:
532+
533+
.. code-block:: bash
534+
535+
ros2 run demo_nodes_cpp talker --ros-args --log-file-name filename
536+
537+
This configures the log file name prefix to ``filename``, instead of the executable file name (which is ``talker`` in this case).

0 commit comments

Comments
 (0)