Open-Source-Software-Entwicklung und Downloads

Browse Subversion Repository

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3226 by maya, Tue Mar 24 09:37:20 2009 UTC revision 3227 by maya, Tue Mar 24 15:10:33 2009 UTC
# Line 1  Line 1 
1  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
2    "http://www.w3.org/TR/html4/strict.dtd">    "http://www.w3.org/TR/html4/strict.dtd">
3  <html>  <html>
4  <head>  <head>
5    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6    <title>logopen</title>    <title>logopen</title>
7    <meta http-equiv="Content-Style-Type" content="text/css">    <meta http-equiv="Content-Style-Type" content="text/css">
8    <link rel="stylesheet" href="../../style.css" type="text/css">    <link rel="stylesheet" href="../../style.css" type="text/css">
9  </head>  </head>
10    
11  <body>  <body>
12    
13    
14  <h1>logopen</h1>  <h1>logopen</h1>
15    
16  <p>  <p>
17  Causes Tera Term to start logging.  Causes Tera Term to start logging.
18  </p>  </p>
19    
20  <pre class="macro-syntax">  <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;]]]  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>  </pre>
23    
24  <h2>Remarks</h2>  <h2>Remarks</h2>
25    
26  <p>  <p>
27  Received characters are written to the file &lt;filename&gt;.<br>  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.  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>  </p>
30    
31  <p>  <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>  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.  If &lt;binary flag&gt; is non-zero, received characters are written without any modifications.
34  </p>  </p>
35    
36  <p>  <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>  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.  If &lt;append flag&gt; is zero and the file &lt;filename&gt; already exists, the file is overwritten.
39  </p>  </p>
40    
41  <p>  <p>
42  If &lt;plain text flag&gt; is not 0, ASCII non-printable characters are not written into log.<br>  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>  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.  If &lt;hide dialog flag&gt; is not 0, "Log" dialog box is not displayed.
45  </p>  </p>
46    
47  <p>  <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>    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>  </p>
50    
51  <h2>Example</h2>  <h2>Example</h2>
52    
53  <pre class="macro-example">  <pre class="macro-example">
54  connect '/C=1'  connect '/C=1'
55    
56  ; get a user name  ; get a user name
57  getenv 'USERNAME' username  getenv 'USERNAME' username
58  ; get the date and time  ; get the date and time
59  gettime timestr "%Y%m%d-%H%M%S"  gettime timestr "%Y%m%d-%H%M%S"
60    
61  ; add the user name and the timestamp to the log file name  ; add the user name and the timestamp to the log file name
62  sprintf2 filename 'console_%s_%s.log' username timestr  sprintf2 filename 'console_%s_%s.log' username timestr
63    
64  ; change the current directory  ; change the current directory
65  changedir 'C:\Documents and Settings\yutaka\desktop'  changedir 'C:\Documents and Settings\yutaka\desktop'
66    
67  logopen filename 0 0  logopen filename 0 0
68  logwrite 'Log start'#13#10  logwrite 'Log start'#13#10
69  logwrite '*****************************************************'#13#10  logwrite '*****************************************************'#13#10
70  logclose  logclose
71    
72  exit  exit
73  </pre>  </pre>
74    
75  </body>  </body>
76  </html>  </html>

Legend:
Removed from v.3226  
changed lines
  Added in v.3227

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