lcm-logger1
Data logger
Usage
- lcm-logger [options] [FILE]
Overview
LCM message logging utility. Subscribes to all channels on an LCM network, and records all messages received to FILE. If FILE is not specified, then a filename is automatically chosen.
Options
The following options are provided by lcm-logger
-
-c, --channel=CHAN -
Channel string to pass to lcm_subscribe. (default: ".*")
-
--flush-interval=MS -
Flush the log file to disk every MS milliseconds. (default: 100)
-
-f, --force -
Overwrite existing files. The default behavior is to fail if the output file already exists.
-
-h, --help -
Shows some help text and exits
-
-i, --increment -
Automatically append a suffix to FILE such that the resulting filename does not already exist. This option precludes -f and --rotate.
-
-l, --lcm-url=URL -
Log messages on the specified LCM URL
-
-m, --max-unwritten-mb=SIZE -
Maximum size of received but unwritten messages to store in memory before dropping messages. (default: 100 MB)
-
--rotate=NUM -
When creating a new log file, rename existing files out of the way and always write to FILE.0. If FILE.0 already exists, it is renamed to FILE.1. If FILE.1 exists, it is renamed to FILE.2, etc. If FILE.NUM exists, then it is deleted. This option precludes -i.
-
--split-mb=N -
Automatically start writing to a new log file once the log file exceeds N MB in size (can be fractional). This option requires -i or --rotate.
-
-q, --quiet -
Suppress normal output and only report errors.
-
-s, --strftime -
Format FILE with strftime.
-
-v, --invert-channels -
Invert channels. Log evertyhing that CHAN does not match.
Rotating and splitting
For long-term logging, lcm-logger can rotate through a fixed number of log files, moving to a new log file as existing files reach a maximum size. To do this, use --rotate and --split-mb. For example:
# Rotate through logfile.0, logfile.1, ... logfile.4
lcm-logger --rotate=5 --split-mb=2 logfile
Moving to a new file happens either when the current log file size exceeds the limit specified by --split-mb, or when lcm-logger receives a SIGHUP.
Signals
On platforms defining SIGHUP, lcm-logger will react to HUP by closing the active log file and opening a new one.
Releases
Unchanged in 5 releases since Debian 9 (Stretch).