deport logging to a separate function to allow using Monolog in the future