# PrecompileTools - how to disable output of @info

**URL:** <https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737>\
**Category:** General Usage\
**Created:** [November 26, 2023, 11:37am UTC](https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737 "2023-11-26T11:37:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![judober](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/judober/32/6676_2.png) [@judober](https://discourse.julialang.org/u/judober)\
**Post date:** [November 26, 2023, 11:37am UTC](https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737/1 "2023-11-26T11:37:03Z")

</div>

I try to implement precompilation with PrecompileTools. It works quite good now. However, in my `compile_workload()` I have some code that uses `@info "test"` resulting in `output during precompilation`.  
I tried to remove the output using Logging:

```julia
    @compile_workload begin

        warnlogger = ConsoleLogger(stderr, Logging.Warn)
        oldlogger = global_logger(warnlogger)
    
        compile_workload()

        global_logger(oldlogger)

    end

```

But this does not remove the output.  
Is there another way to achieve this?

---

<div class="post-metadata">

**Author:** ![Tarny\_GG\_Channie](https://avatars.discourse-cdn.com/v4/letter/t/3bc359/32.png) [@Tarny\_GG\_Channie](https://discourse.julialang.org/u/Tarny_GG_Channie)\
**Post date:** [November 26, 2023, 11:45am UTC](https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737/2 "2023-11-26T11:45:48Z")

</div>

The Julia REPL outputs the returning value of the last statement. Check if that’s the cause of the output.

---

<div class="post-metadata">

**Author:** ![judober](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/judober/32/6676_2.png) [@judober](https://discourse.julialang.org/u/judober)\
**Post date:** [November 26, 2023, 11:50am UTC](https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737/3 "2023-11-26T11:50:38Z")

</div>

I’m pretty sure it’s not the problem here. The output is (simplified for the example):

```julia
Precompiling project...
  1 dependency successfully precompiled in 262 seconds.
  1 dependency had output during precompilation:
┌ MyPackage
│ [ Info: test

```

Also, the last statement retruns `nothing` in my case.

---

<div class="post-metadata">

**Author:** ![judober](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/judober/32/6676_2.png) [@judober](https://discourse.julialang.org/u/judober)\
**Post date:** [November 26, 2023, 11:57am UTC](https://discourse.julialang.org/t/precompiletools-how-to-disable-output-of-info/106737/4 "2023-11-26T11:57:22Z")

</div>

just noticed that accidentally I also run `compile_workload()` when including it. Will try to fix and see if it helps.
