how to treat a logger like an output stream