Skip to content

update comments in log moudule#632

Merged
hnwyllmm merged 1 commit intooceanbase:mainfrom
Gris333:fix-assigned-issue
Dec 11, 2025
Merged

update comments in log moudule#632
hnwyllmm merged 1 commit intooceanbase:mainfrom
Gris333:fix-assigned-issue

Conversation

@Gris333
Copy link
Contributor

@Gris333 Gris333 commented Dec 11, 2025

What problem were solved in this pull request?

Issue Number: close #551

Problem:

  • The original comment for Log::operator<< incorrectly stated that it "won't output header information" (like function, file, line, etc.).
  • However, the actual implementation calls Log::out(), which internally uses LOG_HEAD macro to print full header info (timestamp, PID/TID, context, function, file, line).

This mismatch can mislead users into thinking operator<< only writes raw message content, potentially causing confusion or misuse.

What is changed and how it works?

Updated the Doxygen-style comment above Log::operator<< template function in src/common/log/log.h.

New comment clearly states:

  • operator<< does output standard header info (time, pid/tid, ctx, func, file, line).
  • If user wants to customize or suppress headers, they should use output() / out() methods directly.

Other information

No code logic changed — only comments correction.

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request corrects misleading documentation in the Log module. The original comment for Log::operator<< incorrectly stated that it "won't output header information" when in fact it does emit full header details (timestamp, PID/TID, context, function, file, line) via the LOG_HEAD macro, just like other LOG_* macros.

Key Changes:

  • Updated the Doxygen comment for Log::operator<< to accurately reflect that it outputs standard log headers
  • Clarified when users should use output() method for custom header handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hnwyllmm hnwyllmm merged commit 707a0e0 into oceanbase:main Dec 11, 2025
24 checks passed
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.

Comments in log moudule, log模块的注释

3 participants