add formatter to be configurable

add the possibility to configure the formatter for the handler.