From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resqmta-ch2-09v.sys.comcast.net (resqmta-ch2-09v.sys.comcast.net [IPv6:2001:558:fe21:29:69:252:207:41]) by hurricane.the-brannons.com (Postfix) with ESMTPS id 70DF477DF0 for ; Wed, 13 Jan 2016 00:56:46 -0800 (PST) Received: from resomta-ch2-15v.sys.comcast.net ([69.252.207.111]) by resqmta-ch2-09v.sys.comcast.net with comcast id 5Lxi1s0042Qkjl901LxiMx; Wed, 13 Jan 2016 08:57:42 +0000 Received: from eklhad ([IPv6:2601:405:4001:e487:21e:4fff:fec2:a0f1]) by resomta-ch2-15v.sys.comcast.net with comcast id 5Lxi1s0052MDcd701LxijN; Wed, 13 Jan 2016 08:57:42 +0000 To: Edbrowse-dev@lists.the-brannons.com From: Karl Dahlke Reply-to: Karl Dahlke User-Agent: edbrowse/3.6.1 Date: Wed, 13 Jan 2016 03:57:42 -0500 Message-ID: <20160013035742.eklhad@comcast.net> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1452675462; bh=5aJltBj9lugU8WGw7UFJ9mh9jY2tRqoNOdyFnnnfzeM=; h=Received:Received:To:From:Reply-to:Subject:Date:Message-ID: Mime-Version:Content-Type; b=mgK3sTb5sCW1HLvpaH5zWsGWDOhZukf+NPQXakk7ggaR+YeQ6o6lnpWkuxUl55wlf 8ddMOzaleav3iUVHFxaiglXGRQLVmDbuWcj4WO411owT42w1jDxGaI+/2qtwPRJPwi WnygWvetx13CN+UCRFNTdnNeDIn5l1LVZPvzEEgqZYlbxOl81PqQnoT60fiJmEyGKh rqrBE5QOFiLxWmx0RNFm0WUmgL0i84TMdjlBLUMaLetC747DMA+HOQhSgDA2YevPnx gUkohzs27b0iEaJ5I7xzmHU0+xxQi/QuStOHQZnPBwKRuDaJ/W9Gj1SEfsRiLggu1s vpmfF2dP7PwUA== Subject: [Edbrowse-dev] debugging output to a file X-BeenThere: edbrowse-dev@lists.the-brannons.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Edbrowse Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jan 2016 08:56:46 -0000 A feature that has long been requested. To send your debugging output to a file, do this. db>/tmp/h To go back to stdout, db> When sent to a file, messages at level 1 and 2 are still sent to stdout. Otherwise you wouldn't be able to see what you're doing so to speak. Debug file is limited to 10 megs. I wanted some kind of cap on it, because sometimes I am using debug information to track down an infinite loop. I use setlinebuf to make sure the log is up to date, even if the program seg faults. (This has to be tweaked for windows, no such function.) This was somewhat tedious, but made easier by the internationalization of all the messages. In other words, all the mainstream output vectors through eb_puts(), so I just add some code in there to tee it over to the debug file if present. That takes care of the regular output, then the input which is just in one place, then debugPrint(), and a few more weird situations, and we're there. Karl Dahlke