Fix inline logging function