From: Chet Murthy <chetsky@gmail.com>
To: "caml-list@inria.fr users" <caml-list@inria.fr>
Subject: [Caml-list] A question about Ocaml logging
Date: Mon, 09 Jan 2017 10:52:45 -0800 [thread overview]
Message-ID: <2383491.giY4FN1y6Q@twitter> (raw)
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--
next reply other threads:[~2017-01-09 18:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-09 18:52 Chet Murthy [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2383491.giY4FN1y6Q@twitter \
--to=chetsky@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox