Skip to content

Latest commit

 

History

History
107 lines (72 loc) · 2.3 KB

dmlog.adoc

File metadata and controls

107 lines (72 loc) · 2.3 KB

dmlog(1) Manual Page

NAME

dmlog - sends log to POSIX message queue

SYNOPSIS

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]

DESCRIPTION

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.

OPTIONS

--error, -e n

DMPACK error code (>= 0).

--help, -h

Output available command-line arguments and quit.

--level, -L level

Log level, from debug (1) to user (6) The default level is info (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.

EXIT STATUS

0

Success. Log has been sent.

1

Failure. Program execution failed.

EXAMPLE

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

SEE ALSO

dmlogger(1)

RESOURCES

Project web site: https://www.dabamos.de/

COPYING

Copyright © 2024 Philipp Engel.
Free use of this software is granted under the terms of the ISC Licence.