SchlenkR/FsHttp

Turning off debug logs in FSI

Closed this issue · 3 comments

Is there a way to turn off the debug logging in FSI?

This is my attempt which only works the 2nd time around. My guess is FsHttp's doInit only runs when the http { ... } is first called and overwrites my false to the default true again?

FsHttp.Helper.Fsi.logDebugMessages <- false

let! response =
    http {
        POST url
        body
        ContentType "text/xml"
        text reqBody
    }
    |> Request.sendAsync

Hi, thanks for reporting this issue. I fixed it in 11.0.0 (and also changed the signature / namespace).

It will work like this:

do FsHttp.Fsi.disableDebugLogs()

There's a 11.0.0-preview01 available.

Thank you @RonaldSchlenker that's amazing

Thank you, too! I'll try to remember this issue the next time trying to explain why mutation in a global context can easily lead to unintended behaviour :)