sway
sway copied to clipboard
Emit compiler errors and warnings via `tracing` logs in order for more control over filtering, output target, etc
forc uses tracing for logging. This is quite useful for gaining control over how output is handled. In particular, it makes it much easier to filter certain output.
Currently, forc-util's format_err and format_warning functions that are used for formatting and emitting output write directly to stdout. We should change these to emit output via tracing's logging feature.
Compile errors should likely be emitted via error!, and warnings via warn!.
Blocked by #1661.
Related #2362, #2373.