mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
stderr
This commit is contained in:
@@ -634,7 +634,7 @@ pub const Bundler = struct {
|
||||
// }
|
||||
|
||||
if (enableTracing) {
|
||||
Output.print(
|
||||
Output.printError(
|
||||
"\n---Tracing---\nResolve time: {d}\nParsing time: {d}\n---Tracing--\n\n",
|
||||
.{
|
||||
bundler.resolver.elapsed,
|
||||
|
||||
10
src/cli.zig
10
src/cli.zig
@@ -391,10 +391,10 @@ pub const Cli = struct {
|
||||
}
|
||||
|
||||
if (isDebug) {
|
||||
Output.println("Expr count: {d}", .{js_ast.Expr.icount});
|
||||
Output.println("Stmt count: {d}", .{js_ast.Stmt.icount});
|
||||
Output.println("Binding count: {d}", .{js_ast.Binding.icount});
|
||||
Output.println("File Descriptors: {d} / {d}", .{
|
||||
Output.errorLn("Expr count: {d}", .{js_ast.Expr.icount});
|
||||
Output.errorLn("Stmt count: {d}", .{js_ast.Stmt.icount});
|
||||
Output.errorLn("Binding count: {d}", .{js_ast.Binding.icount});
|
||||
Output.errorLn("File Descriptors: {d} / {d}", .{
|
||||
fs.FileSystem.max_fd,
|
||||
open_file_limit,
|
||||
});
|
||||
@@ -424,7 +424,7 @@ pub const Cli = struct {
|
||||
|
||||
if (did_write and duration < @as(i128, @as(i128, std.time.ns_per_s) * @as(i128, 2))) {
|
||||
var elapsed = @divTrunc(duration, @as(i128, std.time.ns_per_ms));
|
||||
try writer.print("\nCompleted in {d}ms", .{elapsed});
|
||||
try err_writer.print("\nCompleted in {d}ms", .{elapsed});
|
||||
}
|
||||
|
||||
std.os.exit(0);
|
||||
|
||||
@@ -111,6 +111,10 @@ pub const Output = struct {
|
||||
return printError(fmt, args);
|
||||
}
|
||||
|
||||
pub fn errorLn(comptime fmt: string, args: anytype) void {
|
||||
return printErrorln(fmt, args);
|
||||
}
|
||||
|
||||
pub fn printError(comptime fmt: string, args: anytype) void {
|
||||
if (isWasm) {
|
||||
source.error_stream.seekTo(0) catch return;
|
||||
|
||||
Reference in New Issue
Block a user