Modify console output

On a similar question as this, I once posted the following