How to output logs of OpenStack Tacker to a file in devstack

It's quite useful for developers to see the logs of Tacker when we try to deploy vnf, vnffg, or ns etc... It was disabled by default so you need to enable it:

1. Modify the Tacker's configuration:

$ sudo nano /etc/tacker/tacker.conf

2. Adjust the log_file variable with the log file path:

log_file = /opt/stack/logs/tacker.log

3. Restart Tacker

$ sudo systemctl restart devstack@tacker

Now you will see everything happen in the background when you do something with Tacker. For example:

* Open a separate terminal and see the log in real time

$ tail -n 100 -f /opt/stack/logs/tacker.log

* On another terminal, do something like import a new vnfd template:

$ tacker vnfd-create --vnfd-file vnfd.yaml vIDS-TEMPLATE

* Back to the log terminal, you will see what is going on