log to writer