UnixJunkie / dolog

A dumb OCaml logger
Other
37 stars 7 forks source link

No unix #14

Closed samoht closed 9 years ago

samoht commented 9 years ago

I'm not sure that's the right design decision, it's just to open the discussion. I'll need something like that to be able to use dolog in mirage related libraries, the first one being ocaml-git.

UnixJunkie commented 9 years ago

I understand the need at least (not depend on the unix module for portability reasons). But Sys.time is completely different from Unix.gettimeofday. I think I found an implementation of gettimeofday in ocaml once. I think it was written by Gerd, but the code was so big that I didn't want to use that neither depend on the library that was providing it (I don't want external deps for dolog, as much as possible). I could try hard to find back this ocaml implementation, if deemed useful.

UnixJunkie commented 9 years ago

Maybe I was dreaming, I can't find it back.

samoht commented 9 years ago

Hum, it's a fair point. Unfortunately I'll have to fork the library for my needs then.

UnixJunkie commented 9 years ago

I would be completely OK if we keep a special branch for you in here. I thought about what you propose; basically you want people at configuration time to choose the time-stamping function. I could release a new version, not depending on unix but breaking compatibility: before any log users have to setup the time-stamping function. Since you are one of the biggest users of the lib, I might do it soon.

samoht commented 9 years ago

actually a configuration-time option is an interesting alternative. I quite like having nice timestamps by default on Unix.

UnixJunkie commented 9 years ago

On 03/06/2015 10:49 AM, Thomas Gazagnaire wrote:

I quite like having nice timestamps by default on Unix.

Like most users of this library ;)

I'll try to send something today.

— Reply to this email directly or view it on GitHub https://github.com/UnixJunkie/dolog/pull/14#issuecomment-77532889.

Regards, Francois.

UnixJunkie commented 9 years ago

I created this branch: https://github.com/UnixJunkie/dolog/tree/no_unix If you like it, I can release it under opam as dolog-no-unix. I guess you will be the only user of this version. ;)

UnixJunkie commented 9 years ago

@samoht do you want a new opam package (opam-no-unix) or are you ok with just the new branch https://github.com/UnixJunkie/dolog/tree/no_unix ?

samoht commented 9 years ago

The branch works perfectly for me, thanks!