VBScript example: automatic logging

Friday, February 27, 2009 12:16 am
Brian T. Pence

Through the new scripting features of AbsoluteTelnet/SSH, users can now enable automatic session logging with this script. The script uses two AbsoluteTelnet/SSH functions. It uses Terminal.GetHostname to get the hostname which it uses to construct the logfile name, and Terminal.OpenLog to actually open the log.

The rest is pure VBScript to get the date and time and to create the logfile string. You can modify this script to customize how you wish to create the logfile name and where you wish to put it. The default is "c:\logs". At the end of the script, the logfile is opened and then the script terminates. The terminal session remains active until the user terminates it and all of the session data is logged to the file. This is similar to using the File->Open LOG feature at the beginning of every session.

You can put this script in Options->Properties->Scripts if you want it only to apply to the currently open session profile. Alternatively, you can place it in the global startup script on Options->Properties->Global to make log ALL sessions that you open.

I have been using AbsoluteTelnet for a little over a month. We use it's SecureShell abilities as a login to our character-based applications on Linux servers. The product has performed exactly as advertised. Although I've had a few issues (i.e., not knowing how to do certain things in AbsoluteTelnet), the support has been excellent and all of the issues I've encountered have been resolved quickly. -- sywyatt