adding hook for logging, hooks array for adding custom formatting function