loginfo

Retrieves Tera Term log status.

loginfo <strvar>

Remarks

When Tera Term is logging, the file name stores in the strvar variable and the flag status of log starting is stored in the system variable "result".
On the contrary, when Tera Term is not logging, the system variable "result" is set to -1.

The system variable "result" is bitwise OR in the following value:

Value Meaning
1 Binary flag
2 Append flag
4 Plain text flag
8 Timestamp flag
16 Hide dialog flag

Example

loginfo logfile

if result == -1 then
	; When Tera Term is not logging, a new log is started.
	logopen "test.log" 0 0 0 1

elseif result & 8 == 0 then
	flags = result
	; When the log timestamp is disabled, a new log with timestamp is re-opened.
	logclose
	logopen logfile 0 1 flags&4 1 flags&16
endif

See also