#1
|
|||
|
|||
Need to append output to 1 log file
Hi - The attached script will log each session to it's own logfile but I am trying to append all the sessions / output to 1 logfile ex: output.txt. Any assistance is appreciated. Thanks
|
#2
|
||||
|
||||
Hi Wcroth,
It is possible to append the log data to a single log file. This can be done my modifying the start of the logging. The following will start the logging but append the data to the end of the log file: crt.Session.Log True, True Does this help? Do multiple sessions need to log at the same time?
__________________
Thanks, Teresa Teresa Nygren |
#3
|
|||
|
|||
Perfect, thanks!
|
#4
|
|||
|
|||
What would the pause cmd be after it sends command and see's # sign?
If DeviceType = "IOS" then crt.Screen.Send "term len 0" & chr(13) crt.Screen.WaitForStrings "#" crt.Screen.Send "sho ver | in System image" & chr(13) crt.Screen.WaitForStrings "#" WANT A PAUSE RIGHT HERE B4 ITS STARTS NEXT SESSION maybe a 2 or 3 sec pause End If |
#5
|
|||
|
|||
crt.Sleep <millisec>
i.e. crt.sleep 2000 Wes |
#6
|
|||
|
|||
Thanks WesR, new at this. Need help w/ error handling, If a device in my device list is not reachable and I am unable to connect I need the script to continue and also log that in my output file as "Unable to Connect".
|
#7
|
|||
|
|||
Hi wcroth,
I have attached an example script that demonstrates error-handling while connecting in SecureCRT. Using the information contained therein, are you able to successfully accomplish what it is you are looking to do? |
#8
|
|||
|
|||
Thanks Kevin, having trouble with and where to plug it in my current script and writing it to my output file. I know the funtion will go at the bottom, but not sure where to put the actual error check and how to write it to the ouput file.
|
#9
|
|||
|
|||
attached current script
|
#10
|
|||
|
|||
Hi wcroth,
The example script I provided demonstrates the ability to use the vbscript 'On Error Resume Next' command to tell the scripting engine to let us (the script itself) handle all errors. The following is an explanation of how to handle connection errors and log the errors to the SecureCRT log file: Replace your crt.Session.Connect() calls to actually be calls to the Connect() function.Does this information help to handle connection errors and log the errors to the SecureCRT log file? |
![]() |
Thread Tools | |
Display Modes | Rate This Thread |
|
|