summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-25 09:25:51 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-25 09:25:51 +0200
commit1c96bb16885087152da1df5e4c2cca2236c3d08d (patch)
tree1382b0d1488a0629bfb2b8d9be3224f2d4a0c4e8
parent5a1e6aa671908cc8dd73729559c532aab151e92a (diff)
downloadvmadm-1c96bb16885087152da1df5e4c2cca2236c3d08d.tar.gz
doc: add section on logging to README
-rw-r--r--README.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/README.md b/README.md
index 930910d..cd5c2b3 100644
--- a/README.md
+++ b/README.md
@@ -116,6 +116,22 @@ In other words, if you specify any host keys, you get to do everything
by hand. If you want to keep things easy, don't specify any host keys
and let vmadm generate a host key and host certificate for a VM.
+## Logging
+
+To turn on logging, set the environment variable `VMADM_LOG`:
+
+~~~sh
+$ VMADM_LOG=vmadm::libvirt vmadm list
+ DEBUG vmadm::libvirt > connecting to libvirtd qemu:///system
+ DEBUG vmadm::libvirt > listing all domains
+$
+~~~
+
+vmadm uses the `env_logger` Rust library for logging, which is
+documented at <https://docs.rs/env_logger>. The environment variable
+can enable by log level, or by code module, or both. Setting it to
+`trace` gives the most detailed logging.
+
# Using host certificates
Host certificates allow you to access a newly created VM without