TeraTermProject / teraterm

Other
389 stars 31 forks source link

logopen does not create file in 5.x #204

Closed simonztan closed 2 months ago

simonztan commented 2 months ago

Hi,

I've been using this below command in my script for awhile to create log file which works in Teraterm 4.x but once upgraded to 5.x, it does not seems working

logopen logfile 0 1 0 0 1

Is there any change in 5.x on the way the file handle?

simonztan commented 2 months ago

below is the sample of the script

;## Global setting ##

username = 'admin' ; username used to login into Fortigate (super_admin) profile is require hostname = '10.56.2.204' ; IP address of the device sshport = '22' ; change if using custom ssh port dpath = 'C:\IPSEDebug' ; log file store location dprocessfile='IPSE'

;######################## DO NOT MAKE ANY CHANGES BELOW EXCEPT DEBUG COMMAND Section ###############################

msg = 'Enter password for user ' strconcat msg username passwordbox msg 'Enter password'

msg = hostname strconcat msg ':' strconcat msg sshport strconcat msg ' /ssh /auth=password /user=' strconcat msg username strconcat msg ' /passwd=' strconcat msg inputstr

connect msg

foldercreate dpath changedir dpath strconcat dprocessfile '-debug-%Y%m%d.txt' getdate logfile dprocessfile logopen logfile 0 1 0 0 1

zmatsuo commented 2 months ago

Thank you for your report. I confirmed.

Try following workaround.

dpath = 'C:\IPSEDebug' ; log file store location
foldercreate dpath
strconcat dprocessfile '-debug-%Y%m%d.txt'
getdate logfile dprocessfile
strconcat logfull dpath
strconcat logfull '\'
strconcat logfull logfile
logopen logfull 0 1 0 0 1

This seems not good. I will fix .

zmatsuo commented 2 months ago

Fixed.

Please try this binary. https://ci.appveyor.com/project/teraterm/github-main/builds/49703205/artifacts

simonztan commented 2 months ago

I've tested the binary and it works well, thanks for your quick fix. I believe it should be fix in 5.3?

zmatsuo commented 2 months ago

Thank you.😀 This fix will be included in 5.3 This issue is closed.