microsoft / microsoft/CLOG

Hexadecimal format is printed as decimal

Open
#111 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
36
Forks
15
Avg merge
1d 5m
Merged PRs (30d)
1

Description

It seems to me that despite specifying %x format, the resulting logs contain decimal value. This is especially confusing as the string contains 0x prefix:

[3][840b.8435][01:17:56.211381][strm][0x7ee0ec008c50] Setting flags 0x16 (existing flags: 0x0)

https://github.com/microsoft/msquic/blob/e855aa04835dd31d113bb444c5cb2eb9593c286c/src/core/send.c#L410-L415

https://github.com/microsoft/msquic/blob/e855aa04835dd31d113bb444c5cb2eb9593c286c/src/generated/linux/send.c.clog.h.lttng.h#L4C12-L27

Potentially related: https://github.com/microsoft/CLOG/issues/69

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the %x usage in src/core/send.c at lines 410-415 with the generated formatting in src/generated/linux/send.c.clog.h.lttng.h at the linked lines. Reproduce the logging case and trace how the format is transformed; done means the 0x16 and existing 0x0 values are emitted in hexadecimal rather than decimal.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, csharp
Domain
observability, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.