|
#1
|
|||
|
|||
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. |
#2
|
|||
|
|||
Hi AlexG,
I have replicated your results and have created a bug report. I will post here if the developers have further questions or when there is further news. For direct notification, please send an email to support@vandyke.com and reference Forum Thread #14080 in the subject line.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hi AlexG,
As a note: Changes in SecureCRT 8.3 (Beta 1) -- September 21, 2017 ------------------------------------------------------- New features:
![]() I see, we actually added it for other protocols much earlier. Changes in SecureCRT 7.1 (Beta 1) -- February 26, 2013 ------------------------------------------------------ New features:
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 Last edited by bgagnon; 02-17-2020 at 01:59 PM. Reason: Info on original %P in v7.1 |
#4
|
|||
|
|||
Multiple tabs/logs with time stamps
Dear Brenda,
Thanks a lot. I was using 7.0.3 version. After I upgraded to 7.3.3 I indeed found option for %P for logs distinguishing and was able to get time stamps in each line of multiple logs using crt.Session.LogUsingSessionOptions. But I found that to have time stamps, I have to enable "Start log upon connect", otherwise no time stamps. Here I got next "trap". In my case I will have multiple disconnections and connections. Therefore, new log will be opened upon each connection and having tenths or hundreds such for sure complicates analysis. If I will use "Append to file" option to avoid multiple new logs, file name should not have time stamp to allow this.And then if I am running script next time, it will append data to previous log which is not convenient. Any idea how to overcome this? Thank you AlexG |
#5
|
|||
|
|||
Hi Alex,
As a note, any changes/fixes are going to be in v8.7 or later. The only way I know to solve your dilemma presently is to not use timestamps as part of the filename. For sure, not the second specification and possibly minute and hour depending on how often you need to stop/start logging. ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
log , session log , time stamp |
Thread Tools | |
Display Modes | Rate This Thread |
|
|