#1
|
|||
|
|||
Logging not capturing all commands
Hello,
I am using SecureCRT Version 7.0.3 (x64 build 480) for Windows 7. I have a script that runs in multiple tabs open in one window. It's purpose is to determine the device it is logged into, and then send a series of commands to the device based upon that information. The script is to then capture the output of the commands to a text file saved locally on my C:\drive. The problem I am encountering is that the last few commands on a few devices will not be captured if I turn of logging immediately afterwards. If I do not turn off logging (by commenting out the line just below "STOP LOGGING") then the data is captured, however the logging stays on in that tab, which I do not want to occur. I want to turn on logging, save the output and turn it off. This If statement falls in a for loop that runs on every tab in the window following a series of checks. If I need to post the entire script, please let me know. Any help is appreciated! Thanks! ' JUNIPER PRECHECKS BELOW ***************************************** If devicemx80 = 1 then 'START LOGGING If PRECHECK = vbYes Then crt.Session.Log False objCurrentTab.Session.LogFileName = "C:\Checks\" & TID & "\PRE-%S.log" objCurrentTab.Session.Log True Else crt.Session.Log False objCurrentTab.Session.LogFileName = "C:\Checks\" & TID & "\POST-%S.log" objCurrentTab.Session.Log True End If 'SEND COMMANDS objCurrentTab.Screen.Send "show interface description" & chr(13) objCurrentTab.Screen.WaitForString "> " objCurrentTab.Screen.Send "show configuration interfaces xe-0/0/2" & chr(124) & " match address " & chr(13) objCurrentTab.Screen.WaitForString "> " objCurrentTab.Screen.Send "show configuration interfaces xe-0/0/3 " & chr(124) & " match address " & chr(13) objCurrentTab.Screen.WaitForString "> " objCurrentTab.Screen.Send "show interface diagnostics optics " & chr(13) objCurrentTab.Screen.Send " " & chr(13) objCurrentTab.Screen.Send " " & chr(13) objCurrentTab.Screen.WaitForString "> " objCurrentTab.Screen.Send "show ospf neighbor " & chr(13) objCurrentTab.Screen.WaitForString "> " objCurrentTab.Screen.Send "show l2circuit connections" & chr(13) objCurrentTab.Screen.WaitForString "> " 'STOP LOGGING objCurrentTab.Session.Log False End If |
Tags |
log , logging |
Thread Tools | |
Display Modes | Rate This Thread |
|
|