Microseconds

8 views
Skip to first unread message

Waclaw Borowiec

unread,
Apr 12, 2010, 7:43:43 AM4/12/10
to Log4erl
Hi

I think, I found a bug in log4erl version 0.8.6. In log_manager.erl,
in method log() the time is fetched twice: first for date without
microseconds, and then only for microseconds. If calendar:local_time()
is called let's say at 12:00:00.999999, and erlang:now() at 12:00:01.1
then the log would be (and is) written with date like 12:00:00.1 which
is wrong. It results in log entries with dates suggesting, that
they're out of order.

I prepared a small patch for it:

http://log4erl.googlegroups.com/web/log_manager.diff?gda=j_YfJkIAAABRNESUQGVtJhQ5CNAyP3Esyc-bdXlurEhIBGcCkxriYQhl4rltnTShNmoAdVfmtyxV4u3aa4iAIyYQIqbG9naPgh6o8ccLBvP6Chud5KMzIQ

If it's already fixed, then sorry for wasting your time :)

greetings
Waclaw Borowiec

Ahmed Ali

unread,
Apr 16, 2010, 5:23:53 PM4/16/10
to log...@googlegroups.com
Hi Waclaw,

Thanks for the fix. This error existed in all previous versions. I've
just updated the github repo with your fix.

Best regards,

Ahmed
> --
> You received this message because you are subscribed to the Google Groups "Log4erl" group.
> To post to this group, send email to log...@googlegroups.com.
> To unsubscribe from this group, send email to log4erl+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/log4erl?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Log4erl" group.
To post to this group, send email to log...@googlegroups.com.
To unsubscribe from this group, send email to log4erl+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/log4erl?hl=en.

Reply all
Reply to author
Forward
0 new messages