Skip to content

Disable verbose logging by default#50

Merged
nunoplopes merged 5 commits intoCpp2Rust:masterfrom
lucic71:verbose-logging
May 3, 2026
Merged

Disable verbose logging by default#50
nunoplopes merged 5 commits intoCpp2Rust:masterfrom
lucic71:verbose-logging

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 1, 2026

Logging can be re-enabled using the --verbose option

@lucic71 lucic71 force-pushed the verbose-logging branch from 723db5a to 6dc3f47 Compare May 1, 2026 20:25
}
}
llvm::errs() << "Unknown printf format: " << format << "\n";
verrs() << "Unknown printf format: " << format << "\n";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These kinds of things must be printed always. This is not about being verbose or not

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

StrCat(ends_newline ? "eprintln!(" : "eprint!(");
} else {
llvm::errs() << "Uknown fprintf fd: " << fd << "\n";
verrs() << "Uknown fprintf fd: " << fd << "\n";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment thread cpp2rust/logging.h Outdated
void SetVerbose(bool verbose);

llvm::raw_ostream &verrs();
llvm::raw_ostream &vouts();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably only need one stream for verbose

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed vouts and renamed verrs to log

@nunoplopes nunoplopes merged commit fb1e8ea into Cpp2Rust:master May 3, 2026
9 checks passed
lucic71 added a commit to lucic71/cpp2rust that referenced this pull request May 3, 2026
Logging can be re-enabled using the `--verbose` option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants