Optimised logging