Fix detection of selected notebook tab.
Implementation of log plugin and integration.