Merge pull request #102 from riccardo/logging-refactoring

Logging refactoring