This commit is contained in:
Jarred Sumner
2022-02-14 04:27:53 -08:00
parent 8cb9391534
commit eadca53e7b
2 changed files with 5 additions and 4 deletions

View File

@@ -3096,7 +3096,7 @@ pub const Bundler = struct {
);
}
if (FeatureFlags.tracing) {
if (FeatureFlags.tracing and bundler.options.log.level == .info) {
Output.prettyErrorln(
"<r><d>\n---Tracing---\nResolve time: {d}\nParsing time: {d}\n---Tracing--\n\n<r>",
.{

View File

@@ -298,9 +298,10 @@ pub const Output = struct {
return print(fmt, args);
}
pub const debug = if (Environment.isDebug) _debug else _noop;
fn _noop(comptime _: string, _: anytype) void {}
pub inline fn debug(comptime fmt: string, args: anytype) void {
if (comptime Environment.isRelease) return;
return prettyErrorln("\n<d>DEBUG:<r> " ++ fmt, args);
}
pub fn _debug(comptime fmt: string, args: anytype) void {
std.debug.assert(source_set);