[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lwt-json-logger and crunch releases



Great! Just a word of warning that the Lwt_logger might not be the best thing
to use in production anger.  The progress bar can only be implemented via a 
custom Lwt_section which leaks memory per bar, so this is definitely a 
prototype.

I'm wondering if we should just create a simple functorised Log module around
Async/Lwt and use that instead.  It would also give us much more flexibility for
(e.g.) providing callbacks for more advanced plotting such as live spark-graphs
on values.

The Async approach is to generate a lazy datastructure, and the Lwt approach is 
a
p4 extension that is compiled out of production binaries.  I'm inclined to go 
with
the Async approach and leave logging in all the time.  It's also easier to turn 
a
dynamic webserver on/off on demand.  Balraj hacked one directly into the TCP 
stack,
and I'm thinking being able to toggle it there might be quite useful.

-anil

On 21 Sep 2012, at 19:06, Jon Ludlam <jjl25@xxxxxxxxx> wrote:

> Hurrah! Success!
> 
> The logger is installed and running - very nice indeed. I'm sure I'll be able 
> to use this in a number of places.
> 
> Jon
> 
> On 21 Sep 2012, at 23:30, Anil Madhavapeddy wrote:
> 
>> You're like a human Jenkins!  The OPAM file for the dev repo wasn't synched 
>> with
>> the release repo.  I just did that, and it should install into the right 
>> prefix
>> now...
>> 
>> Btw, I'm going with the convention of just calling the dev repo packages 
>> (which 
>> have git:// URLs and are refreshed on every opam update) as 1.0.0, and the 
>> main
>> opam-repository with tarballs will have lower release versions (0.9.2 for 
>> cohttp
>> at present).
>> 
>> This means we don't have to keep updating the dev package on every release, 
>> as
>> OPAM sometimes gets unhappy and full of Not_founds when a package directory
>> disappears...
>> 
>> -anil
>> 
>> On 21 Sep 2012, at 18:19, Jon Ludlam <jjl25@xxxxxxxxx> wrote:
>> 
>>> Hmm. The good news is that crunch 1.0.1 installs flawlessly! The bad news 
>>> is - well, let's just say I now anxiously await cohttp.1.0.1…
>>> 
>>> Logfile attached!
>>> 
>>> Jon
>>> 
>>> <log>
>>> 
>>> On 21 Sep 2012, at 22:34, Jon Ludlam wrote:
>>> 
>>>> FYI I'm getting another failure to install 'crunch' into /usr/local/bin/ - 
>>>> you pesky mac users keep breaking my opam!
>>>> 
>>>> I'm frustrated because I _love_ the idea of lwt-json-logger and want to 
>>>> use it immediately!
>>>> 
>>>> Jon
>>>> 
>>>> 
>>>> On 21 Sep 2012, at 22:00, Anil Madhavapeddy wrote:
>>>> 
>>>>> I've released another two packages into OPAM today:
>>>>> 
>>>>> ocaml-crunch: http://github.com/mirage/ocaml-crunch
>>>>> ------------
>>>>> 
>>>>> $ opam update
>>>>> $ opam install crunch
>>>>> $ man ocaml-crunch
>>>>> $ ocaml-crunch --help
>>>>> 
>>>>> This is a tidied up version of the mirage-fs `mir-crunch` utility, which 
>>>>> converts a directory into a static OCaml module that has no dependency on
>>>>> that filesystem.
>>>>> 
>>>>> It uses cmdliner to generate man pages and nice help, so I separated it
>>>>> from the mirage-fs repository (which is where all the Block and Fat32
>>>>> libs go, and this is useful independently. 
>>>>> 
>>>>> Secondly:
>>>>> 
>>>>> ocaml-lwt-json-logger: http://github.com/avsm/ocaml-lwt-json-logger
>>>>> ---------------------
>>>>> 
>>>>> $ opam install lwt-json-logger
>>>>> 
>>>>> This uses crunch to embed a debug web server within any Lwt/Mirage
>>>>> binary, and serves up the log messages using fancy AJAX.  To try it
>>>>> out, opam install the library (so you have all the dependencies) and
>>>>> then clone the repo and run ./_build/lib_test/lwt_json_logger_test.native
>>>>> 
>>>>> It will start a webserver on localhost:8080, which you can connect to
>>>>> with a web browser to see the debug messages.
>>>>> 
>>>>> The interface is still pretty beta, but I'm going to start using it
>>>>> in the Signpost code and see how useful it is.  I hope to add more
>>>>> live progress bars using js_of_ocaml soon!
>>>>> 
>>>>> -anil
>>>>> 
>>>> 
>>>> 
>>> 
>> 
> 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.