Log refactoring. Granular logging