Vary logging deping on outputhandler

I would like to format output different when logging to different outputhandlers. For instance, logging to a Textfile requires some formatting to make it more readable. But logging to a database (Aurelius) does not. I would like to be able to do that.