test for #5383 - using logger default errorhandler with streamwriter