summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-25 07:26:25 +0000
committerLars Wirzenius <liw@liw.fi>2021-03-25 07:26:25 +0000
commit8e6febfb777714c5b7f5ed9843e660ef218d3eb0 (patch)
tree1382b0d1488a0629bfb2b8d9be3224f2d4a0c4e8
parent5a1e6aa671908cc8dd73729559c532aab151e92a (diff)
parent1c96bb16885087152da1df5e4c2cca2236c3d08d (diff)
downloadvmadm-8e6febfb777714c5b7f5ed9843e660ef218d3eb0.tar.gz
Merge branch 'logging' into 'main'
doc: add section on logging to README See merge request larswirzenius/vmadm!28
-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