From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 8C5FD7FA5F for ; Mon, 16 Jan 2017 16:14:30 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=anil@recoil.org; spf=None smtp.mailfrom=anil@recoil.org; spf=None smtp.helo=postmaster@bark.recoil.org Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=pra; client-ip=5.153.225.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of anil@recoil.org) identity=mailfrom; client-ip=5.153.225.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="anil@recoil.org"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@bark.recoil.org) identity=helo; client-ip=5.153.225.51; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="anil@recoil.org"; x-sender="postmaster@bark.recoil.org"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A67AJgh/7j9msnP9uRHKM819IXTAuvvDOBiVQ1KB4?= =?us-ascii?q?1ekcTK2v8tzYMVDF4r011RmSDNmdsK8P0ruI+4nbGkU4qa6bt34DdJEeHzQksu?= =?us-ascii?q?4x2zIaPcieFEfgJ+TrZSFpVO5LVVti4m3peRMNQJW2aFLduGC94iAPERvjKwV1?= =?us-ascii?q?Ov71GonPhMiryuy+4ZPebgFHiTanb75/LBq6oRjVu8QXnIBvNrs/xhzVr3VSZu?= =?us-ascii?q?9Y33loJVWdnxb94se/4ptu+DlOtvwi6sBNT7z0c7w3QrJEAjsmNXs15NDwuhnY?= =?us-ascii?q?UQSP/HocXX4InRdOHgPI8Qv1Xpb1siv9q+p9xCyXNtD4QLwoRTiv6bpgRRn1gy?= =?us-ascii?q?kFKjE56nnahdB/g6xGoByupRJxzYHXboGbKvRwebjQfc8YSGpEQspRVzBNDp26?= =?us-ascii?q?YoASD+QBJ+FYr4zlqlYSqxu+BA2sD/7oxDBSm3D23bc10/o7HgHewgMvAs8BsX?= =?us-ascii?q?TJp9jyLqgSV+G1zK3TwDXZcfxZxTD96InMchw7pvGMR71wfNPXxEIyGQ3FiVCQ?= =?us-ascii?q?ppbkPzOTzukCrXKb7/B6WuKzim4nshxxrSa1ysgwionEgJ8exFPc9ShhwIs5P8?= =?us-ascii?q?C0RU51bNK+DpdcqSGXO5F2T88/W21kpSI3x7IctZO5YiQG0okryh/eZvCdbYSF?= =?us-ascii?q?5A/oWvyLLjdinn1lfaqyhxas/kikze3xTtK730xQripGiNXMrG4C2ADU6siGTv?= =?us-ascii?q?tx5ECh2SyA1wzL6+FEJ147lbbDJpMh2LI8i5oevErZEiPohkn7jLWae0U59uSw?= =?us-ascii?q?7uToeLTmppuSN49ujQH+N7wjlda5AeQ5NggDRHKb9vqg273k/E35RK9Gjvoskq?= =?us-ascii?q?nWqJzaP9gUpralAw9J1YYu8wqwAC2j0NQchHUHKFNFeAmbj4XyIFHPIPX4De+l?= =?us-ascii?q?jFi2kTdrwerGPrz7DZnXIHjDiuSpQbEowE5R1EIW0MpD54McXroBLe7oWV7Zu9?= =?us-ascii?q?nRDxt/OAuxlbXJEtJ4g6oYWGbHJ6aVMKrMuEeF6u4+a72FYo4RkCzwIP8k47jp?= =?us-ascii?q?l3BvygxVRrWgwZZCMCPwJf9hOUjMOXc=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AKBQDV4nxY/zPhmQVdGgEBAQECAQEBA?= =?us-ascii?q?QgBAQEBFgEBAQMBAQEJAQEBgw4BAQEBAR9fgQmOSpEEH4gEjSiCCyaCRoM2Agi?= =?us-ascii?q?BfkEWAQEBAQEBAQEBAQFiKIIzGYIdAQEBAwE6BgMBNQEBAwsLGC4hNgYTiGgDE?= =?us-ascii?q?AwBCa1xgw2DCAcChBcNgkwBAQEBAQEEAQEBAQEBAQEBFgEIiEcIgl2CUIUrgjG?= =?us-ascii?q?VNIVTOIZdhn6EBGeBYY4lihiELYQnJggpgVEIOhABghaEC3OIbgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0AKBQDV4nxY/zPhmQVdGgEBAQECAQEBAQgBAQEBFgEBAQM?= =?us-ascii?q?BAQEJAQEBgw4BAQEBAR9fgQmOSpEEH4gEjSiCCyaCRoM2AgiBfkEWAQEBAQEBA?= =?us-ascii?q?QEBAQFiKIIzGYIdAQEBAwE6BgMBNQEBAwsLGC4hNgYTiGgDEAwBCa1xgw2DCAc?= =?us-ascii?q?ChBcNgkwBAQEBAQEEAQEBAQEBAQEBFgEIiEcIgl2CUIUrgjGVNIVTOIZdhn6EB?= =?us-ascii?q?GeBYY4lihiELYQnJggpgVEIOhABghaEC3OIbgEBAQ?= X-IronPort-AV: E=Sophos;i="5.33,239,1477954800"; d="scan'208";a="209348799" Received: from bark.recoil.org ([5.153.225.51]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2017 16:14:29 +0100 Received: from bark.recoil.org (localhost [127.0.0.1]) by bark.recoil.org (OpenSMTPD) with ESMTP id f39215d0; Mon, 16 Jan 2017 15:14:28 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=recoil.org; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s= selector1; bh=JQZ2I7RPhgrm8jdM279h7KpT56M=; b=krb/lEI9JhfRfQ4mn3 YyypvzEPuIuec+4UKVj17b5mhdCAI2jwhX1bbDOTvpCzeS22PBeaE9igoqbjrUcV 4G4WLcA7/y24wIKzpCqFwUGMyTl7QP6hprw7EIcqSNlQkTNpICOy8YUOhNF/rRqN BoxprWN1iKW5ttFBwrY9FKnGQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=recoil.org; h=content-type :mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; q=dns; s= selector1; b=kdjlMhy79b2zEWDqyCElU3ibZkO9Z/uad5mY9UyGqFoxCnDbLgn uCIVEMqnRGp0GGZfS/RYYEuHICuCl75ExkRrQY2GVepY0XQjMF4P4y/MXV2BdEUa KPEq4ES6V0DGvZ2/EjWip2KUFd6UlJHGjnGoLDJxlEQNYzno1mqMU0J8= Received: from dock.cam.docker.com (mail.astons-coaches.co.uk [194.72.166.2]) by bark.recoil.org (OpenSMTPD) with ESMTPSA id 5929f08f (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Mon, 16 Jan 2017 15:14:28 +0000 (GMT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) From: Anil Madhavapeddy In-Reply-To: <2383491.giY4FN1y6Q@twitter> Date: Mon, 16 Jan 2017 15:14:27 +0000 Cc: "caml-list@inria.fr users" Content-Transfer-Encoding: 7bit Message-Id: <6099A589-2D9B-4394-B727-E7F8B26067FD@recoil.org> References: <2383491.giY4FN1y6Q@twitter> To: Chet Murthy X-Mailer: Apple Mail (2.3251) Subject: Re: [Caml-list] A question about Ocaml logging > On 9 Jan 2017, at 18:52, 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. Dear Chet, In MirageOS, we've been moving away from syntax extensions and towards placing the logging directives as closures directly within the code. This is slightly slower in the case of debug logging, but in practise for distributed systems we are finding that having "permanent" logging at different levels is more valuable than the "recompile with debug logging" that we used to use. The basis library for this that our libraries are mostly using now in the forthcoming MirageOS3 is Daniel Buenzli's Logs library: http://erratique.ch/software/logs It does not have a syntax extension out of the box, but it does provide flexible support for multiple backends, and has an Lwt module included. Hope that helps! regards, Anil