Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-16-2020, 06:58 AM
AlexG AlexG is offline
Registered User
 
Join Date: Jan 2020
Posts: 5
Multiple tabs/logs with time stamps

Hello,
Need help please.
I am running Python script that opens a few tabs, each to the same IP but different port. Activate log per tab. In addition, want to have time stamp in front of every log’s line.
One option that I may use – is to configure default session with option “on each line” something like “%h-%m” and to use in the script option “crt.Session.LogUsingSessionOptions” which will set per tab default configuration including per line time stamp. However, since I have same IP and different ports per tab, I have no option to have unique log name. I may include Host name (IP) as part of name (%H) and session name %S (which in default session is the same for all tabs), but there is no option to include port as part of name. Therefore, I get a few log files with the same name (including time stamp into log name does not help to distinguish between them). Not sure whether I could change name on later stage, also would help.
Another option that I tried, is to configure each session individually, like:
objTab.Session.Log (False)
objTab.Session.Config.SetOption("Custom Log Message Each Line", "%D_%h_%m")
objTab.Session.LogFileName = strPath + strCaption + "(" + port + ")_%D-%M-%Y-%h_%m_%s.txt"
objTab.Session.Log (True)
I get unique names for log files but no time stamps.
Much appreciate help.
Reply With Quote
 

Tags
log , session log , time stamp

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 02:55 AM.