# Issue: Redirect output to an IOBuffer

**URL:** https://discourse.julialang.org/t/issue-redirect-output-to-an-iobuffer/17578
**Category:** New to Julia
**Tags:** question
**Created:** [November 15, 2018, 9:27pm UTC](https://discourse.julialang.org/t/issue-redirect-output-to-an-iobuffer/17578 "2018-11-15T21:27:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)
#### Post date: [November 15, 2018, 9:27pm UTC](https://discourse.julialang.org/t/issue-redirect-output-to-an-iobuffer/17578/1 "2018-11-15T21:27:23Z")

</div>

I found [https://github.com/JuliaLang/julia/issues/12711](https://github.com/JuliaLang/julia/issues/12711) however that seems to be outdated… nothing works for me

what is the current recommended way to capture stdout to a variable?  
E.g. by using `redirect_stdout` in combination with something similar to `IOBuffer`?

---

<div class="post-metadata">

### Author: ![schlichtanders](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/schlichtanders/32/32145_2.png) [@schlichtanders](https://discourse.julialang.org/u/schlichtanders)
#### Post date: [November 15, 2018, 9:48pm UTC](https://discourse.julialang.org/t/issue-redirect-output-to-an-iobuffer/17578/2 "2018-11-15T21:48:06Z")

</div>

duplicate of [Capturing available data written to redirected STDOUT and/or STDERR](https://discourse.julialang.org/t/capturing-available-data-written-to-redirected-stdout-and-or-stderr/6378)

bottomline:

- use [https://github.com/JuliaIO/Suppressor.jl](https://github.com/JuliaIO/Suppressor.jl) `@capture_out`
