mirror of
https://github.com/Seldaek/monolog.git
synced 2026-04-26 16:15:49 +03:00
[GH-ISSUE #65] Logger->addRecord() broken for locales using , as decimal digit separator #16
Labels
No labels
Bug
Documentation
Feature
Needs Work
Support
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/monolog#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hanneskod on GitHub (Mar 13, 2012).
Original GitHub issue: https://github.com/Seldaek/monolog/issues/65
Some locales use , as decimal digit separator instead of . This breaks datetime creation in Logger->addRecord().
I ran across this bugg using:
setlocale(LC_ALL, "sv_SE.utf8", "sv_SE", "sv");
@hanneskod commented on GitHub (Mar 13, 2012):
Here is a quick fix:
@Seldaek commented on GitHub (Mar 14, 2012):
Thanks for reporting and for the proposed fix, I'll take a look later this week hopefully, crazy busy right now no time to look in detail.
@Seldaek commented on GitHub (Apr 22, 2012):
I wasn't able to reproduce unfortunately, but I think the fix I pushed is correct nonetheless. Please check and confirm.
@hanneskod commented on GitHub (Apr 23, 2012):
Fix is confirmed. I guess the locale in question have to be installed in your OS to reproduce this behavoir...
A really nice fix I must say though. For someone like myself, not comming from the world of C, the sprintf function often seams like magic. This time all that was needed was a 10 sec. look at the documentation. So it goes!
@Seldaek commented on GitHub (Apr 23, 2012):
Ok cool!