caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] A question about Ocaml logging
@ 2017-01-09 18:52 Chet Murthy
  2017-01-09 19:13 ` Daniil Baturin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Chet Murthy @ 2017-01-09 18:52 UTC (permalink / raw)
  To: caml-list@inria.fr users

All,

I hope this is the right place to ask this question.  I've been
writing a nontrivial distributed system (well, a number of them over
the last few years) and have had need of a robust and flexible logging
framework.  Specifically, I've been using "bolt" and its descendant,
"volt", which provide camlp4 syntax extensions.  These extensions make
the syntax of the logging statements significantly less verbose, and
that in itself ia a valuable thing.

With the arrival of ppx rewriters, I realize that the camlp4/camlp5
method of adding syntax to ocaml is deprecated.  So I wonder: is there
some really good logging toolkit out there, that I've overlooked.

I'm aware of a number of different packages, but only bolt/volt have
syntax extensions, and it's my belief that they're essential to making
effortless pervasive log-line instrumentation.

But perhaps I just haven't looked hard enough ....  So .... before I
go write my own, I figured I'd ask the list if there were such a
thing.

For concreteness, the basic thing I'm looking for, is a syntax
extension that somewhat resembles

  LOG "%s" appid LEVEL DEBUG ;

which expands out to code something like

begin
  if log_enabled <current-module/function-path-as-string> DEBUG then
    log (Printf.sprintf "%s" appid)
end

I hate writing "slight variations on somebody else's good idea", so
would much prefer to "improve" somebody else's library/tool, than come
up with my own.

Thanks in advance,
--chet--


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-17 19:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-09 18:52 [Caml-list] A question about Ocaml logging Chet Murthy
2017-01-09 19:13 ` Daniil Baturin
2017-01-09 19:41 ` Hugo Herbelin
2017-01-16 15:14 ` Anil Madhavapeddy
2017-01-17 11:52   ` Jesper Louis Andersen
2017-01-17 19:20     ` Malcolm Matalka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).