Skip to content

Conversation

@yinggeh
Copy link
Contributor

@yinggeh yinggeh commented Jun 5, 2025

Previously, all triton logs (INFO, WARNING, ERROR) are written into stderr. Changing the output stream of INFO log to stdout.

Some common practive I found stdout vs stderr. As @rmccorm4 mentioned, it seems relatively standard practice to log info stdout and warn/error+ to stderr for enterprise applications.

Test PR: triton-inference-server/server#8236

@yinggeh yinggeh self-assigned this Jun 5, 2025
@yinggeh yinggeh added the bug Something isn't working label Jun 5, 2025
@yinggeh yinggeh changed the title test: Set trINFO log output stream to stdout fix: Set correct log output stream Jun 5, 2025
@yinggeh yinggeh requested a review from rmccorm4 June 5, 2025 20:00
file_stream_ << msg << std::endl;
} else {
} else if (level == Level::kINFO) {
std::cout << msg << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

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

Tried doing some brief research on this topic from perf perspective, main difference between stdout/stderr is whether they're buffered or not. From some brief searching, it seems relatively standard practice to log info stdout and warn/error+ to stderr for enterprise applications.

Any original context or importance of using stderr for everything you're aware of @GuanLuo?

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that matters

@yinggeh yinggeh requested a review from GuanLuo June 5, 2025 22:30
@yinggeh yinggeh merged commit 8a7a916 into main Jun 6, 2025
1 check passed
@yinggeh yinggeh deleted the yinggeh-DLIS-8320-fix-log-output-stream branch June 18, 2025 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Development

Successfully merging this pull request may close these issues.

4 participants