dmlog - sends log to POSIX message queue
dmlog --help
dmlog --version
dmlog --node id --message string [--logger name] [--level n] [--error n] [--node id] [--sensor id] [--target id] [--observ id] [--source source] [--verbose]
The dmlog utility forwards a log message to the POSIX message queue of a
dmlogger(1) instance. Argument --message
is mandatory. The default log level
is info
(2). Valid log levels are debug
(1), info
(2), warning
(3),
error
(4), critical
(5), and user
(6). The program terminates after log
transmission.
- --error, -e n
-
DMPACK error code (>= 0).
- --help, -h
-
Output available command-line arguments and quit.
- --level, -L level
-
Log level, from
debug
(1) touser
(6) The default level isinfo
(2). The argument may be an integer or log level name string. - --logger, -l name
-
Name of logger instance and POSIX message queue (default is
dmlogger
). - --message, -m string
-
Log message (max. 512 characters).
- --node, -N id
-
Node id.
- --observ, -O id
-
Observation id (UUIDv4).
- --sensor, -S id
-
Sensor id.
- --source, -Z source
-
Name of log message source (sender).
- --target, -T id
-
Target id.
- --verbose, -V
-
Print log to stdout.
- --version, -v
-
Output version information and quit.
Send a log message to the POSIX message queue of logger dmlogger
:
$ dmlog --node dummy-node --level warning --message "low battery" --source test --verbose 2022-12-09T22:50:44.161000+01:00 [WARNING ] test - low battery
The logger will receive the log message and insert it into the log database (if the log level is greater or equal the minimum log level):
$ dmlogger --node dummy-node --database log.sqlite --verbose 2022-12-09T22:50:44.161000+01:00 [WARNING] test - low battery
Project web site: https://www.dabamos.de/