Browse Subversion Repository
Contents of /trunk/doc/en/html/macro/command/logpause.html
Parent Directory
| Revision Log
Revision 3221 -
( hide annotations)
( download)
( as text)
Tue Mar 24 09:37:20 2009 UTC
(4 years, 2 months ago)
by maya
File MIME type: text/html
File size: 1207 byte(s)
CVS から SVN へ移行: trunk に集約
| 1 |
maya |
332 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
| 2 |
|
|
"http://www.w3.org/TR/html4/strict.dtd">
|
| 3 |
maya |
571 |
<html>
|
| 4 |
|
|
<head>
|
| 5 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
| 6 |
|
|
<title>logpause</title>
|
| 7 |
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
| 8 |
|
|
<link rel="stylesheet" href="../../style.css" type="text/css">
|
| 9 |
|
|
</head>
|
| 10 |
yutakakn |
206 |
|
| 11 |
maya |
571 |
<body>
|
| 12 |
yutakakn |
206 |
|
| 13 |
|
|
|
| 14 |
maya |
571 |
<h1>logpause</h1>
|
| 15 |
yutakakn |
206 |
|
| 16 |
maya |
571 |
<p>
|
| 17 |
|
|
Causes Tera Term to pause logging.
|
| 18 |
|
|
</p>
|
| 19 |
yutakakn |
206 |
|
| 20 |
maya |
571 |
<pre class="macro-syntax">
|
| 21 |
|
|
logpause
|
| 22 |
|
|
</pre>
|
| 23 |
|
|
|
| 24 |
|
|
<h2>Remarks</h2>
|
| 25 |
|
|
|
| 26 |
|
|
<p>
|
| 27 |
|
|
Received characters are discarded while logging is paused.
|
| 28 |
|
|
</p>
|
| 29 |
|
|
|
| 30 |
yutakapon |
1008 |
<h2>Example</h2>
|
| 31 |
|
|
|
| 32 |
|
|
<pre class="macro-example">
|
| 33 |
|
|
prompt = '$'
|
| 34 |
|
|
|
| 35 |
|
|
cygconnect
|
| 36 |
|
|
wait prompt
|
| 37 |
|
|
|
| 38 |
|
|
; get a user name
|
| 39 |
|
|
getenv 'USERNAME' username
|
| 40 |
|
|
; get the date and time
|
| 41 |
|
|
gettime timestr "%Y%m%d-%H%M%S"
|
| 42 |
|
|
|
| 43 |
|
|
; add the user name and the timestamp to the log file name
|
| 44 |
maya |
1086 |
sprintf2 filename 'd:\console_%s_%s.log' username timestr
|
| 45 |
yutakapon |
1008 |
;messagebox filename 'filename'
|
| 46 |
|
|
|
| 47 |
|
|
logopen filename 0 0
|
| 48 |
|
|
logwrite 'Log start'#13#10
|
| 49 |
|
|
sendln 'cal'
|
| 50 |
|
|
wait prompt
|
| 51 |
|
|
; Suspend logging
|
| 52 |
|
|
logpause
|
| 53 |
|
|
; The below command is not logging
|
| 54 |
|
|
sendln 'date'
|
| 55 |
|
|
wait prompt
|
| 56 |
|
|
; Resume logging
|
| 57 |
|
|
logstart
|
| 58 |
|
|
sendln 'uptime'
|
| 59 |
|
|
wait prompt
|
| 60 |
|
|
logwrite '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@'#13#10
|
| 61 |
|
|
logclose
|
| 62 |
|
|
|
| 63 |
|
|
exit
|
| 64 |
maya |
1034 |
</pre>
|
| 65 |
yutakapon |
1008 |
|
| 66 |
maya |
571 |
</body>
|
| 67 |
|
|
</html>
|
|