From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 2C3CC7FD90 for ; Mon, 9 Jan 2017 20:13:20 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=daniil@baturin.org; spf=Pass smtp.mailfrom=daniil@baturin.org; spf=None smtp.helo=postmaster@srv-se.enfan.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of daniil@baturin.org) identity=pra; client-ip=46.253.202.162; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniil@baturin.org"; x-sender="daniil@baturin.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of daniil@baturin.org designates 46.253.202.162 as permitted sender) identity=mailfrom; client-ip=46.253.202.162; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniil@baturin.org"; x-sender="daniil@baturin.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@srv-se.enfan.org) identity=helo; client-ip=46.253.202.162; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="daniil@baturin.org"; x-sender="postmaster@srv-se.enfan.org"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A5g8RPBfh9YgMQWds2CArRM+tlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcu8Yh7h7PlgxGXEQZ/co6odzbGH7+a6BSdZu8/JmUtBWaQEbwUCh8?= =?us-ascii?q?QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6?= =?us-ascii?q?OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBq7oR/PusQZjoduN7g9xgbUqXZUZu?= =?us-ascii?q?pawn9lK0iOlBjm/Mew+5Bj8yVUu/0/8sNLTLv3caclQ7FGFToqK2866tHluhnF?= =?us-ascii?q?VguP+2ATUn4KnRpSAgjK9w/1U5HsuSbnrOV92S2aPcrrTbAoXDmp8qlmRAP0hC?= =?us-ascii?q?oBKjU09nzchM5tg6JBuB+vugJxw4DUbo+WOvRxcKzSctEGSmdaUcZdSzZMDISg?= =?us-ascii?q?Y4YBD+cMO/tToYnnp1sJqBuzHQeiC/npyj9Jh3/22bAx3vk7HgHawQwgBdMOsH?= =?us-ascii?q?LJp9jyKagdS+a1zKjJzTXHdP5Zwi3y6JTVchA7oPGMW6h8cc3LyUkgDg7IiEib?= =?us-ascii?q?p4LiPzOQzOsNsm6b4vJ7Wu21l24nthtxojmpxss2jYnJnI0Vx1bZ/it62IY4Pd?= =?us-ascii?q?K1RU9hbdK6EJZduTuWO5VqTs88WW1kpSc3xqMetZO0fSUG0ooryhDeZvCdboSF?= =?us-ascii?q?7BzuWPyPLTtlmH5ofq+0iQyo/ki60OL8U9G50FZUoSpBldnBrmsN1wbN6sSeUf?= =?us-ascii?q?ty4F2t1iiJ1wDd8O5EJ1o4la3BK54u2rIwl5wTvlrfHiLul0j7jbWaelsk9+Wm?= =?us-ascii?q?8ejrfKnqqoGGO4NpiwzyLLwimsmlDuQ5NggOUXKb+eO51LD74EL2WrNKjvw3kq?= =?us-ascii?q?ndq53VPt4UprKkAw9P04Yj7QyzDzC80NQXhXUHNk5KeAqbj4j1PFHDOOz3Au26?= =?us-ascii?q?g1SoiTtrw/HGPqb9ApjWNXjCkLLhfa5n5EJGyQozy8pf55NOBb0bLvLzQBy5iN?= =?us-ascii?q?uNBRY8N0mwwv37INR7zIIXH2yVUYGDN6aHnVaO5+Mra8OFeJIPuTC1f/Qs4f/v?= =?us-ascii?q?iVczkEMAZ6ivm5wNZybrTbxdP0yFbC+00Z86GmAQs19mQQ=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0DqBADh33NY/6LK/S5dHAEBBAEBCgEBG?= =?us-ascii?q?AEFAQsBgw8BAQEBAR9ATl2OSZE0lSeCCoYiAgiBX0ESAQEBAQEBAQEBAQFiKII?= =?us-ascii?q?zGIIeAQVAAQE4DwsYHAERVxMIAQGIcK8ogw2DCAEBBYcxBwiIR4JfhRIXgWsMg?= =?us-ascii?q?wyQFYsMg2eBfoxPj3WSVSYLJoESEgciCDeEIYIWZ4hmAQEB?= X-IPAS-Result: =?us-ascii?q?A0DqBADh33NY/6LK/S5dHAEBBAEBCgEBGAEFAQsBgw8BAQE?= =?us-ascii?q?BAR9ATl2OSZE0lSeCCoYiAgiBX0ESAQEBAQEBAQEBAQFiKIIzGIIeAQVAAQE4D?= =?us-ascii?q?wsYHAERVxMIAQGIcK8ogw2DCAEBBYcxBwiIR4JfhRIXgWsMgwyQFYsMg2eBfox?= =?us-ascii?q?Pj3WSVSYLJoESEgciCDeEIYIWZ4hmAQEB?= X-IronPort-AV: E=Sophos;i="5.33,340,1477954800"; d="asc'?scan'208";a="208533738" Received: from srv-se.enfan.org ([46.253.202.162]) by mail3-smtp-sop.national.inria.fr with ESMTP; 09 Jan 2017 20:13:19 +0100 Received: from eirin.enfan.tld (static-user-46-236-133-210.tomtelnet.ru [46.236.133.210]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by srv-se.enfan.org (Postfix) with ESMTPSA id 9848912AED6 for ; Tue, 10 Jan 2017 02:13:17 +0700 (+07) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baturin.org; s=default; t=1483989197; bh=iZLJZ6nsK86QZT/coB3ElY9Wqt4EWEkDRrcZo1Lo4dk=; h=Subject:To:References:From:Date:In-Reply-To; b=UVdYMkYil2dzBV5HuJvmBDht46f3PzFEGGBkDDQQiUujwiFSBEuzC1xFzQ/k0Yosq /CSLKbMkW6EfjnP3UfLTXGOr0K1wrhs/FoL4dkgEF9KYYZ1RslikmkJoO2/MuxTsaq S9H2WabLbDZKITxXyM9yqUJe8n5jqmfH00IZxmrA= To: caml-list@inria.fr References: <2383491.giY4FN1y6Q@twitter> From: Daniil Baturin Message-ID: Date: Tue, 10 Jan 2017 02:13:04 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <2383491.giY4FN1y6Q@twitter> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TWlCVhCiaH5D8odU5cWhQ2xemC8nR6LSf" Subject: Re: [Caml-list] A question about Ocaml logging This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TWlCVhCiaH5D8odU5cWhQ2xemC8nR6LSf Content-Type: multipart/mixed; boundary="NMNOl23VV7WxhitLJxWAWlLUX3irwdCX0"; protected-headers="v1" From: Daniil Baturin To: caml-list@inria.fr Message-ID: Subject: Re: [Caml-list] A question about Ocaml logging References: <2383491.giY4FN1y6Q@twitter> In-Reply-To: <2383491.giY4FN1y6Q@twitter> --NMNOl23VV7WxhitLJxWAWlLUX3irwdCX0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Chet, Have you looked into the logging modules from Lwt? While they work best for those who already use Lwt, and they definitely have their shortcoming, on the plus side the log statements are very concise, you can set the log level and add logging rules at runtime, and it has file and syslog logging out of the box. On 01/10/2017 01:52 AM, Chet Murthy wrote: > 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 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-- > > --=20 #!/usr/bin/env perl @a=3Dsplit(//, "daniil @ baturin . org" );# Daniil Baturin @b=3Dsplit(//,q/Px%!+o0Q6lh*7dp$.@8#%|y{/);while($i<24){$_.=3D chr((ord(@b[$i])-ord(@a[$i])+62)%94+32);$i++};print"$_\n"# --NMNOl23VV7WxhitLJxWAWlLUX3irwdCX0-- --TWlCVhCiaH5D8odU5cWhQ2xemC8nR6LSf Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIwBAEBCAAaBQJYc+DLExxkYW5paWxAYmF0dXJpbi5vcmcACgkQRybflRHgrx+Y oRAAnzgCaXLPFeXQy2vIwVeOIVv86oaqwEdLK2IwAp8yKk5TZ7O0iyfrdBvasGFY 2E/3Kvjil2jk+rsVBuKq34Wd4wvHs69zXnelveRnJZq5EUHJlJA0aDOa3QOUVFKl FCyyNbI9DkEGnhDGMRXp1flJhyZBLnGADRS6h+fwa4J0Lwct3/m9gVulNLMUuioI 5viGcYkfMlzsJJg/w+lfSJU/QHIFqalbZneX4Yu7h7ov5lBTkbigwL35BUY90kEF TDA9xiqNpMzYuM0PJ8nHdQkFi+YDAkA2xBc2Vys09sP2SsAs/hzKR2BZOz62hCWz lOeCZ5/Cudid8ffNFjO6iVbHzugHBbFlyCbWMVc65ugr4Zoqjmm1DzQJFdaxnvDq Ad5LepUDQzIj9hk6kQpXGk7yVG+dkYdV2uSIZR5HyCMJd4GFgim9Wksgny0gDnmd sCqFC4EWXXoXfzBOlF+sZeGqm4t3gKtX3hgQT5qvneny/6XvkccwnTwH64bF1YHS xSHvF1omPqxk29Dd5SS/qgO5AeQ7epaaVJ84F/FU00wfo1R4HiLSfq39xyi1JSBt kPRQ44vSKtQ3+E0ywGlFG+ajY/T3SjC+5FV+WkIlTWPpYnD+HiEIpayUYD3yp0b9 pY674wUq6FC0pLK3Bcca9+8OX4VfF7xDFSrXGcfSE5kYuoE= =JsFl -----END PGP SIGNATURE----- --TWlCVhCiaH5D8odU5cWhQ2xemC8nR6LSf--