Skip to content

Enhance logger to format message with placeholders#69

Open
odain-cbd wants to merge 4 commits intomasterfrom
feature/9112-ease-specialchars-troubleshooting
Open

Enhance logger to format message with placeholders#69
odain-cbd wants to merge 4 commits intomasterfrom
feature/9112-ease-specialchars-troubleshooting

Conversation

@odain-cbd
Copy link
Contributor

@odain-cbd odain-cbd commented Jan 19, 2026

After struggling with a CSV collector that had hidden hideous '\uFEFF' invible char in header line, I decided to propose below enhancements (I could have spared so much time and energy)

  • enhancing logging mechanism with placeholders
    Example:
    Utils::Log(LOG_WARNING, "Invalid columns '%1\$s' '%2\$s' '%3\$s'.", "primary_key", "colA", "colB");

  • using this new behaviour in some collect/synchro strategical places to help collector users detects special chars issues.

Example: use a CSV collector with below line
\uFEFFprimary_key,name,lastname,whatever 123,john,does,yes

Output TODAY:
[WARNING] Invalid column 'primary_key', will be ignored. [ERROR] Failed to import the data

Output with PR:
[WARNING] Invalid column '\uFEFFprimary_key', will be ignored. [ERROR] Failed to import the data

@odain-cbd odain-cbd requested review from Hipska and accognet January 19, 2026 15:51
@odain-cbd odain-cbd self-assigned this Jan 19, 2026
@odain-cbd odain-cbd added the enhancement New feature or request label Jan 19, 2026
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Jan 19, 2026
@odain-cbd odain-cbd requested a review from dflaven January 20, 2026 10:14
Copy link
Collaborator

@Hipska Hipska left a comment

Choose a reason for hiding this comment

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

I simple used sprintf before, but I'm fine with this as well..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal Work made by Combodo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants