Bugfix: add logs to history. Closes #2871.