Not all Handlers can necessarily write to any IO. Most require writing a log at a time, with some specific API call, which is not how the IO interface works (it takes bytes). I think it's good to keep IO as a parameter to DefaultHandler. Maybe even introduce an IOHandler abstract type into the hierarchy if there's a strong possibility of another handler using IO.
Note: I'm solving the issue right now with this hacky trick:
Not all Handlers can necessarily write to any IO. Most require writing a log at a time, with some specific API call, which is not how the IO interface works (it takes bytes). I think it's good to keep IO as a parameter to DefaultHandler. Maybe even introduce an IOHandler abstract type into the hierarchy if there's a strong possibility of another handler using IO.
Note: I'm solving the issue right now with this hacky trick: