Add option to log function params