Logging refactor

Changes necessary to sort out output access inside the avocado application.