Welcome to the VanDyke Software Forums

Join the discussion today!

Go Back   VanDyke Software Forums > Scripting

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 10-27-2020, 09:43 AM
Rhudi's Avatar
Rhudi Rhudi is offline
Registered User
Join Date: Jul 2013
Location: Greenville, SC
Posts: 90
Custom Log Data not working

I have a script that works very well to establish AdHoc connections to devices. This script has an added bonus of trying SSH, then TELNET. Once either of those is connected, I have code as follows (all variables are properly defined):
            Select Case bConnected
                Case True ' Connected
                    UserName = env("USERNAME")
                    UserProf = env("USERPROFILE")
                    objTab.Caption = strConnectType & strShortHostName
                    crt.Session.SetStatusText("Connected: " & strConnectType & strShortHostName)
                      Set objTab = crt.GetScriptTab
                      Set objConfig = objTab.Session.Config
                      objConfig.SetOption "Custom Log Message Each Line", "%h:%m:%s | "                    
                    crt.Session.LogFileName =  UserProf & "\SecureCRT Logs\" & UserName & "\%Y-%M-%D.%h.%m - " & strShortHostName & " -- (" & UserName & ").log"
                    crt.Session.Log True
                Case False ' Not Connected
                    crt.Dialog.MessageBox "Try again later:" & vbCrLf & strShortHostName
            End Select
The problem is, this line has no visible impact:
objConfig.SetOption "Custom Log Message Each Line", "%h:%m:%s | "

I do get my log file in the specified folder, but the lines have no time stamp.

I am using:
Version 8.3.4 (x64 build 1699) - Official Release - July 12, 2018
and have no ability to upgrade.

Last edited by Rhudi; 10-27-2020 at 10:30 AM. Reason: minor correction

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -6. The time now is 03:21 PM.