Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

Contents of /trunk/doc/en/html/macro/command/logopen.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3227 - (show annotations) (download) (as text)
Tue Mar 24 15:10:33 2009 UTC (15 years, 1 month ago) by maya
File MIME type: text/html
File size: 2379 byte(s)
CVS から SVN へ移行: 改行コードを LF から CR+LF へ変換
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2 "http://www.w3.org/TR/html4/strict.dtd">
3 <html>
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <title>logopen</title>
7 <meta http-equiv="Content-Style-Type" content="text/css">
8 <link rel="stylesheet" href="../../style.css" type="text/css">
9 </head>
10
11 <body>
12
13
14 <h1>logopen</h1>
15
16 <p>
17 Causes Tera Term to start logging.
18 </p>
19
20 <pre class="macro-syntax">
21 logopen &lt;filename&gt; &lt;binary flag&gt; &lt;append flag&gt; [&lt;plain text flag&gt; [&lt;timestamp flag&gt; [&lt;hide dialog flag&gt;]]]
22 </pre>
23
24 <h2>Remarks</h2>
25
26 <p>
27 Received characters are written to the file &lt;filename&gt;.<br>
28 When the file does not include \ character, the file is saved at the TeraTerm current directory. If a user want to change the directory, use the <a href="changedir.html">changedir</a> macro command.
29 </p>
30
31 <p>
32 If &lt;binary flag&gt; is zero, received new-line characters are converted (CR -&gt; CR/CRLF) and escape sequences are stripped out.<br>
33 If &lt;binary flag&gt; is non-zero, received characters are written without any modifications.
34 </p>
35
36 <p>
37 If &lt;append flag&gt; is non-zero and the file &lt;filename&gt; already exists, received characters are appended to it.<br>
38 If &lt;append flag&gt; is zero and the file &lt;filename&gt; already exists, the file is overwritten.
39 </p>
40
41 <p>
42 If &lt;plain text flag&gt; is not 0, ASCII non-printable characters are not written into log.<br>
43 If &lt;timestamp flag&gt; is not 0, a timestamp is added on top of log.<br>
44 If &lt;hide dialog flag&gt; is not 0, "Log" dialog box is not displayed.
45 </p>
46
47 <p>
48 If a log file is successfully opened, the system variable "result" is set to 0. Otherwise, the "result" is set to 1. <em>(version 4.62 or later)</em>
49 </p>
50
51 <h2>Example</h2>
52
53 <pre class="macro-example">
54 connect '/C=1'
55
56 ; get a user name
57 getenv 'USERNAME' username
58 ; get the date and time
59 gettime timestr "%Y%m%d-%H%M%S"
60
61 ; add the user name and the timestamp to the log file name
62 sprintf2 filename 'console_%s_%s.log' username timestr
63
64 ; change the current directory
65 changedir 'C:\Documents and Settings\yutaka\desktop'
66
67 logopen filename 0 0
68 logwrite 'Log start'#13#10
69 logwrite '*****************************************************'#13#10
70 logclose
71
72 exit
73 </pre>
74
75 </body>
76 </html>

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26