Export the function formatLogData() in module layout.js