Stream: t-compiler/help

Topic: debug!()

blitzerr (Mar 09 2019 at 03:42, on Zulip):

debug! automatically adds the timestamp but not the line number that inserts the debug text. Is it a deliberate choice ?

simulacrum (Mar 09 2019 at 04:18, on Zulip):

@blitzerr Yep, if you want the reverse (line number but no timestamp) you could use the dbg macro, e.g.

simulacrum (Mar 09 2019 at 04:19, on Zulip):

debug! comes from log by the way (and is pretty standard across the ecosystem)

blitzerr (Mar 09 2019 at 04:45, on Zulip):

Thanks a lot @simulacrum. I was not trying to add new debug! but was trying to dump the ones that are already sprinkled all over rustc code. I was trying to understand why debug! was not generating line numbers but I guess the fact that it uses log underneath, would explain why. Thanks a lot.

Last update: Sep 18 2020 at 20:30UTC