unified and improved logging behaviour