[comp.sys.amiga.tech] Help! Need LOGFILE utility!!

dsheythe@milton.u.washington.edu (Donald Sheythe) (10/27/90)

For our CS assignments, our professor was kind enough to let us use
Modula-2, so I decided to use my trusty Benchmark compiler.

However, the assignments require a log of the program actually running.

It's an interactive CLI program and I can redirect the output to a file,
but I can't see what I'm doing.  All the output goes to the file.


What I need is a program (or shell) that will capture all CLI input/output 
so I can see the output and get all of it recorded at the same time.

On the VAXen, this is really easy to do.  All you gotta do is type 
the commands STARTLOG and STOPLOG.


Thanks in advance,

Don Sheythe                     
dsheythe@milton.u.washington.edu

rosenber@ra.abo.fi (Robin Rosenberg INF) (10/27/90)

In article <10007@milton.u.washington.edu>, dsheythe@milton.u.washington.edu (Donald Sheythe) writes:
> For our CS assignments, our professor was kind enough to let us use
> Modula-2, so I decided to use my trusty Benchmark compiler.

Here they *force* us to use Modula-2.

> However, the assignments require a log of the program actually running.
> 
> It's an interactive CLI program and I can redirect the output to a file,
> but I can't see what I'm doing.  All the output goes to the file.
>
> What I need is a program (or shell) that will capture all CLI input/output 
> so I can see the output and get all of it recorded at the same time.
> 
> On the VAXen, this is really easy to do.  All you gotta do is type 
> the commands STARTLOG and STOPLOG.

Run the program from a script file.

echo >pipe: noline	; Looks stupid, but is necessary to make sure we
type pipe:		; don't accidentally get TWO instances of pipe:
run tee <pipe:a logfile	; Tee copies stdin to stdout and to the file
myprog >pipe:a		; Runs our program, output goes to the pipe

Tee is trivial to write yourself and pipe: is included with 1.3. Since
your program is interactive, make sure tee copies input to output character
by character, use AmigaDOS IO for that.

	Robin 

sjorr@lion.uwaterloo.ca (Stephen Orr) (10/29/90)

Another simple way to handle this problem is to use the public domain
utility CB (short for console buffer). It attaches a prop gadget to the 
shell and lets you scroll back through a user setable number of output
lines. You can also save the output, print the output etc. This technique
is VERY useful for debuging with lots of 'printf's (c-ism). I am presently
using cb version 1.1 which I beleive to be the newest.

					Stephen Orr
---
too lazy to .sig
---

dsheythe@milton.u.washington.edu (Donald Sheythe) (10/30/90)

Here's the best suggestion I've gotten so far (though I haven't tried CB yet):


Check on abcfd20.larc.nasa.gov in the incoming/amiga dir.  You should
find a relatively new program called DCMD.lzh (I am not sure of the
case).

If I remember the readme file correctly, this is Matt Dillon's version
of CMD. Only it works on a console.  I have yet to try it.

Good luck.

Jeff

-- 
Jeffrey D. Parker(no philosopher)| By all means marry; if you get a good wife, 
INET: parker@vela.acs.oakland.edu  | you'll become happy; if you get a bad one,
BITNET: PARKER@OAKLAND             | you'll become a philosopher.      Socrates
UUCP: ...!umich!vela!amiga1!fanatic| (Or get an AMIGA - You'll be Happy!)



The DCMD utility (Thanks, Matt Dillon!) works well for capturing
CLI I/O.

However, there are a couple of problems.  Unless your input is
echoed to the terminal, it won't be captured in the log file.  

Benchmark's Input routines do echo the input string, so this
isn't a problem for me.


---

Robin,
	I tried your pipe: idea, and it sounds doable, but after
four or five hours of working on it, I decided to give up.  Seems
that the 1.3 pipe: and me don't get along, and I think that there
are some problems with the pipe: device.


---

Does anybody know if Commodore is including a log file
capability as part of the 2.0 CLI environment?

I think that something like this would be a very useful part of
the system software.  

For example, to print out a CLI session, you could type STARTLOG
PRT: and the printer is sent a copy of whatever you're doing.





Thanks to all who responded.  I really appreciate it.

sjorr@lion.uwaterloo.ca (Stephen Orr) (10/30/90)

In article <10205@milton.u.washington.edu> dsheythe@milton.u.washington.edu (Donald Sheythe) writes:
>
>
>Here's the best suggestion I've gotten so far (though I haven't tried CB yet):
>
>The DCMD utility (Thanks, Matt Dillon!) works well for capturing
>CLI I/O.
>
>However, there are a couple of problems.  Unless your input is
>echoed to the terminal, it won't be captured in the log file.  
>
The last time I used CB for this purpose it handled grabbing the input
just fine. It even dealt cleanly with me editing the input (ie using bs
and del) which is surprising given that it captures out to the rastport.

					Stephen Orr
					SandIsoft
---
too lazy to .sig
---