A utility to control the built-in logger for services.
The logtool utility connects to running services to control their built-in
logging subsystem.
Usage
Logtool supports several sub-commands. There are many command-line flags
which provide parameters for these sub-commands. The most commonly used
parameter is -loggerHostname
which specifies the service instance to control.
At startup, logtool will read parameters from the
~/.config/logtool/flags.default
and ~/.config/logtool/flags.extra
files.
These are simple name=value
pairs. The basic usage pattern is:
logtool [flags...] command [args...]
Built-in help is available with the command:
logtool -h
Some of the sub-commands available are:
- debug: inject a debug log message at the specified level
- print: inject a log message
- set-debug-level: set the debug logging level for service to the level
specified
- watch: watch for subsequent log messages generated by the service and
write to stdout. Debug messages above the specified level are
shown. If the loggerHostname FQDN resolves to multiple addresses
all instances will be connected to and their logs displayed
Security
The various services in this ecosystem restrict RPC access using TLS client
authentication. Logtool will load certificate and key files from the
~/.ssl
directory. Logtool will present these certificates to the
service. If one of the certificates is signed by a certificate authority
that the service trusts, the service will grant access.