Adjust logging code to be more tunable from config.js