logdump
Name
logdump − prints MagAO-X binary log files in a readable format.
Synopsis
logdump [options] appname
Description
logdump reads the log file(s) for the app specified with appname.
Possible modes of operation are: - Print entries from all log files
present (default if no other options are given) - Print just the N most
recent files, specified with `–nfiles`` - Follow the application’s
logs, printing each new entry untill logdump is killed. - In any of
these cases, the minimum log level can be specified. - In any of these
cases, the output can be limited to a specific event code or set of
codes.
logdump by default looks in the MagAO-X system log directory,
normally /opt/MagAOX/logs. This can be changed with thte --dir
option.
Options
Sh ort  | 
Long  | 
Config-File  | 
Type  | 
De scription  | 
|---|---|---|---|---|
  | 
  | 
config  | 
string  | 
A local config file  | 
  | 
  | 
none  | 
Print this message and exit  | 
|
  | 
  | 
pauseTime  | 
int  | 
When f ollowing, time in mil liseconds to pause before checking for new entries.  | 
  | 
  | 
fi leCheckInterval  | 
int  | 
When f ollowing, number of pause intervals between checks for new files.  | 
  | 
  | 
dir  | 
string  | 
Directory to search for logs. MagAO-X default is normally used.  | 
  | 
  | 
ext  | 
string  | 
The file extension of log files. MagAO-X default is normally used.  | 
  | 
  | 
nfiles  | 
int  | 
Number of log files to dump. If 0, then all matching files dumped. Default: 0, 1 if f ollowing.  | 
  | 
  | 
follow  | 
bool  | 
Follow the log, printing new entries as they appear.  | 
  | 
  | 
level  | 
in t/string  | 
Minimum log level to dump, either an integer or a string. -1/ TELEMETRY [the default], 0 /DEFAULT, 1/D1/DBG 1/DEBUG2, 2/D2/DB G2/DEBUG1 ,3/INFO,4 /WARNING, 5/ERROR,6 /CRITICAL ,7/FATAL. Note that only the mininum unique string is required.  | 
  | 
  | 
code  | 
int vector  | 
The event code, or vector of codes, to dump. If not s pecified, all codes are dumped. See log Codes.hpp for a complete list of codes.  | 
Exit Status
How logdump exits depends on the mode of operation. If it is
printing all or a set number of log files, it will exit normally after
printing the last entry. If it is following a log, it will not exit
until signaled (e.g. with ctrl-c).
Examples
To dump all the log entries for the application trippLitePDU0:
$ logdump trippLitePDU0
To dump just the last 2 log files:
$ logdump -n 2 trippLitePDU0
To show only log entries with level WARNING or higher:
$ logdump -n2 -L W trippLitePDU0
To show only specific log entries, in this case change of PDU outlet state, run:
$ logdump -C 12001,12002 trippLitePDU0
To follow the log, showing log level WARNING or higher:
$ logdump -L W -f trippLitePDU0