Skip to content

Capture and emit function name in log messages#2080

Open
chenBright wants to merge 1 commit into
abseil:masterfrom
chenBright:log_functin_name
Open

Capture and emit function name in log messages#2080
chenBright wants to merge 1 commit into
abseil:masterfrom
chenBright:log_functin_name

Conversation

@chenBright

Copy link
Copy Markdown

This PR adds the function name (__func__) to absl log messages, making it appear in the log prefix right after the line number, which gives a more precise callsite identifier.

# before
I0102 03:04:05.678900     451 foo.cc:1234] RAW: hello world

# after
I0102 03:04:05.678900     451 foo.cc:1234 MyFunc] RAW: hello world

@google-cla

google-cla Bot commented Jun 12, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@chenBright

Copy link
Copy Markdown
Author

I have signed the CLA.

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.

1 participant