Enhanced logging mechanism