From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29059 invoked by alias); 21 Jun 2003 18:01:29 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29014 invoked from network); 21 Jun 2003 18:01:27 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 21 Jun 2003 18:01:27 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id LAA05043; Sat, 21 Jun 2003 11:01:23 -0700 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma005031; Sat, 21 Jun 03 11:01:10 -0700 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id h5LI1DB21581; Sat, 21 Jun 2003 11:01:13 -0700 (PDT) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id LAA22642; Sat, 21 Jun 2003 11:01:13 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16116.40297.515332.184602@casey.transmeta.com> Date: Sat, 21 Jun 2003 18:01:00 -0000 To: Daniel Jacobowitz Cc: gdb-patches@sources.redhat.com Subject: RFC: Syntax for logging In-Reply-To: <20030621172358.GA8711@nevyn.them.org> References: <20030621172358.GA8711@nevyn.them.org> X-SW-Source: 2003-06/txt/msg00669.txt.bz2 Daniel Jacobowitz writes: > Folks may remember the thread from a year ago: > RFA: >, >>, and "tee" operators > http://sources.redhat.com/ml/gdb-patches/2002-07/msg00458.html > > I eventually decided that my prefered syntax was: > redirect [-a] [FILE [COMMAND]] > log [-a] [FILE [COMMAND]] > But people didn't care for the use of "-a". I still like this syntax; it's > symmetric, and it allows clearly "transcript [-a]". But it's pretty clear > to me that we won't reach a consensus on that. I believe Fernando liked it > and Andrew didn't. > > I believe the best alternative at this point is: > set logging [redirect|log] [append|overwrite] FILE > show logging > The defaults would be log,overwrite; they could be explicitly specified in > order to overwrite a log file named append, if one wanted to do that. > > Comments, anyone? Shall I repost the patch with that change? I'd really > like to see this feature added. There's one useful piece of functionality that isn't in "set logging". Suppose I want to do a one-off command without disturbing the current setting? This is an inherent problem in all set/show commands. If one could have a version of show commands that outputted a value that is an acceptable argument to the set command, and if one has a facility to capture the output of commands and record them in variables, then one would have a general solution, but that's a bit of work (but not that much work ;-). In pseudo-gdb code: set $foo $`show -for-set logging` set logging new-value mumble set logging $foo fwiw, I don't think you should add a logging facility until you know how you're going to solve the one-off request. One don't have to solve it right away, but one should at least have thought about it. It needn't be solved by something so grandiose of course. This is where redirect/log have an advantage though I'm guessing one could come up with something simple that allowed one-off's with "set logging".