Accessing logs¶
The MicroOVN services provide logs as part of their normal operation.
By default they are provided through the systemd journal, and can be accessed
through the use of the journalctl
or snap logs
commands.
This is how you can access the logs of the microovn.chassis
service using
the snap logs
command:
snap logs microovn.chassis
and using the journalctl
command:
journalctl -u snap.microovn.chassis
This is how you can view a live log display for the same service using
the snap logs
command:
snap logs -f microovn.chassis
and using the journalctl
command:
journalctl -f -u snap.microovn.chassis
Log files¶
Inside the /var/snap/microovn/common/logs
directory you will find files for
each individual service, however these will either be empty or not contain
updated information, this is intentional.
On a fresh install the files are created, as a precaution, in the event a need arises for enabling debug logging. When upgrading MicroOVN, existing files will be retained, but not updated.
Debug logging¶
The Open vSwitch (OVS) and Open Virtual Network (OVN) daemons have a rich set of debug features, one of which is the ability to specify log levels for individual modules at run time.
A list of modules can be acquired through the microovn.ovs-appctl
and
microovn.ovn-appctl
commands.
This is how to enable debug logging for the Open vSwitch vswitchd
module:
microovn.ovs-appctl vlog/set vswitchd:file:dbg
This is how to enable debug logging for the Open Virtual Network reconnect
module:
microovn.ovn-appctl vlog/set reconnect:file:dbg
For more details on how to configure logging, see ovs-appctl manpage.