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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id EDFCA7FD6C for ; Fri, 4 Dec 2015 18:03:35 +0100 (CET) IronPort-PHdr: 9a23:EDiIUxLf0dDRJ7RchNmcpTZWNBhigK39O0sv0rFitYgULfXxwZ3uMQTl6Ol3ixeRBMOAu6wC07KempujcFJDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXsq3G/pQQfBg/4fVIsYL+lRMiK14ye7KObxd76W01wnj2zYLd/fl2djD76kY0ou7ZkMbs70RDTo3FFKKx8zGJsIk+PzV6nvp/jtLYqySlbuuog+shcSu26Ov1gFf0LRAghZkw84szmsVHp2Q2d4npUBmkflBtFB07P8Rz8TJPwmibgrONh2TCHMIv9TeZndy6l6vJOQRvjjyMCfxsw7GjTicU42KdeqQ6oox9264HRaYCRcvF5e/WOLpshWWNdU5MJBGR6CYSmYt5KVrJZMA== Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f51.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.82.51 as permitted sender) identity=mailfrom; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f51.google.com) identity=helo; client-ip=74.125.82.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-wm0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CPAQCoxmFWlDNSfUpehA1urBuHAoopAQ2BbiGCLRCDMAKBKDgUAQEBAQEBAQEQAQEBAQcLCwkfMIItgggBAQMBEhEdARsdAQMBCwYFCw8CBSECAg8BBA8RAQUBIhMih3cBAwoIBAmhT4ExPjGLSIFqgnmGWwoZJw1Wg30BAQEBAQUBAQEBAQEBARUBBQ5zg0OCEIR9hFmDHoFEBZZhhS2ID4FbSYZtj2qCJTaBFx8BAYJGI4FdcoVvAQEB X-IPAS-Result: A0CPAQCoxmFWlDNSfUpehA1urBuHAoopAQ2BbiGCLRCDMAKBKDgUAQEBAQEBAQEQAQEBAQcLCwkfMIItgggBAQMBEhEdARsdAQMBCwYFCw8CBSECAg8BBA8RAQUBIhMih3cBAwoIBAmhT4ExPjGLSIFqgnmGWwoZJw1Wg30BAQEBAQUBAQEBAQEBARUBBQ5zg0OCEIR9hFmDHoFEBZZhhS2ID4FbSYZtj2qCJTaBFx8BAYJGI4FdcoVvAQEB X-IronPort-AV: E=Sophos;i="5.20,380,1444687200"; d="scan'208";a="190479721" Received: from mail-wm0-f51.google.com ([74.125.82.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 04 Dec 2015 18:03:35 +0100 Received: by wmww144 with SMTP id w144so69920302wmw.1 for ; Fri, 04 Dec 2015 09:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=ik2cuArJioxrDp6+y6cx1BXc6wc4X9zWjAb2molx1I4=; b=YnW3CJQ5UGGJZ8OiYTKEXVSRqyTFAxQLBK/7TZCp4Uwf3vY0gskp3rWZuSlTTqoMXv Y5iTVY+mUleGYpXK/qIh3WxcEL+NIm8K2kQ/AL0p6RJ09zOWghb6YbyIaOilBSDCQAc8 ni6Vozbop/BiX8kW3gGlM7ypujD+jHofadpj+UNT1w07hOiPLKXouHqL7aJW+z9bfNKv FCwJbvP07H8Er5MI/9JdjYDl7ZD5fG46BZpjfWhblDohiVnbLruuSFiY/rWciX8X86If +83oqZ6J1nJCFOBnhf29sbKRBEAfQadbocbNlDKjuMLMeZm2ed9eWZEX3FLvhYGt/VJS hd4A== X-Received: by 10.28.176.200 with SMTP id z191mr6622844wme.102.1449248615061; Fri, 04 Dec 2015 09:03:35 -0800 (PST) Received: from localhost (li195-236.members.linode.com. [178.79.139.236]) by smtp.gmail.com with ESMTPSA id t9sm2166523wjx.25.2015.12.04.09.03.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Dec 2015 09:03:34 -0800 (PST) From: Malcolm Matalka To: Daniel =?utf-8?Q?B=C3=BCnzli?= Cc: OCaml List , "mirageos-devel\@lists.xenproject.org" , Jeremy Yallop , Drup References: <9FD64A9BC7C04CE0815129733504EE2E@erratique.ch> Date: Fri, 04 Dec 2015 17:03:32 +0000 In-Reply-To: <9FD64A9BC7C04CE0815129733504EE2E@erratique.ch> ("Daniel =?utf-8?Q?B=C3=BCnzli=22's?= message of "Thu, 3 Dec 2015 19:41:47 +0000") Message-ID: <864mfyuowr.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] [ANN] Logs 0.4.2 Daniel B=C3=BCnzli writes: > Hello,=20=20 > > I'd like to announce the first release of Logs. Here's the blurb: > > Logs provides a logging infrastructure for OCaml. Logging is performed= =20 > on sources whose reporting level can be set independently. Log message= =20 > report is decoupled from logging and is handled by a reporter. > > A few optional log reporters are distributed with the base library and= =20 > the API easily allows to implement your own.=20 > > Logs depends only on the `result` compatibility package. The optional=20 > `Logs_stdo` reporter on standard outputs depends on Fmt. The optional > `Logs_browser` reporter that reports to the web browser console depend= s=20 > on js_of_ocaml. The optional `Logs_cli` library that provides command l= ine > support for controlling Logs depends on `Cmdliner`. > > Logs and its reporters are distributed under the BSD3 license. > > Feedback on the API is welcome, it could still change a bit before stabil= izing on a 1.0.0 release.=20 > > Homepage: http://erratique.ch/software/logs > API docs: http://erratique.ch/software/logs/doc > > The continuation based formatting trick used by Logs for minimizing non-l= ogging overhead is based on Jeremy Yallop's findings; Gabriel > Radanne helped to make further tests. Thanks to them and see [1] for the = full discussion. > > Best,=20 > > Daniel > > [1] https://github.com/mirage/ocaml-git/pull/130#issue-111278246 I poked around the documentation a bit but I wasn't quite clear on if Logs provides a synchronous or asynchronous API. I've found that in most logging frameworks, people prefer asynchronous semantics because it's fast (just toss it in a queue and then do the rest of your program). IME, on production services, logging needs to be synchronous. That is, the log call should not return until the logging endpoint has processed it, whatever that may be. This is because, when things go south, all one has is logs and maybe a core dump if they are lucky so any behaviour that lets the program get beyond what it has logged is providing an incomplete picture. On top of that, when logging a lot one will run out of space if it is purely async.