Builds log module from the tool. A bit hackish.