|
#1
|
|||
|
|||
Unable to log session
Hi I keep getting this error message when I run my script. I can write to folder that this file is save to, I have full write and read access, I only have one session open.
https://pasteboard.co/H9tiZhr.png <-- image in case this get taken down: The message was "Unable to open log file: log123.log. Access is denied. ![]() It works at one point and I play around with some session options and now it doesn't log anymore. If I do it manually it works, file-> log session. Side question: Is there a way to reload the default SecureCRT config instead of uninstalling the whole program and reinstalling it? I don''t know what I change and don't see anywhere, where I can put all the config back to default. Thanks, Last edited by Hang; 02-26-2018 at 03:34 PM. |
#2
|
|||
|
|||
Hi Hang,
What version of SecureCRT are you using? On what OS? Quote:
If so, it does not appear it is a fully-qualified path (or you would see that in the error message). What folder are you checking the permissions on? Quote:
The Global.ini file is where SecureCRT gets the info for Global Options. However, every session has its own INI file (ie: Session Options). New sessions use Default.ini (in the Sessions subfolder of the config folder) as the template. The location of your installation's Configuration folder is found in the General / Configuration Paths category of SecureCRT's Global Options. (In fact, uninstalling/reinstalling usually will not reload a default config, because that info is in the configuration folder, not the installation folder.)
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
I am running Version 8.1.4 (build 1443) on win7 x64.
Yes, I am setting the log location via script. Code:
TestLog = currentTab.Session.LogFileName = "Test123.log" currentTab.Screen.Synchronous = True currentTab.Session.Log(True) .. CODE .. currentTab.Session.Log(False) Anyways, I got it working again. After your comment about the path not being qualified. I went into the session options->Terminal->Log File and then browse for the folder where it supposed to be saved in and delete the file name just leaving the path to the folder and that works. FYI, the folder is already set properly to where I wanted to save my file. The weird thing is that if I go back the Log File menu I don't see the path that was set it, only the file name like how it was when it didn't work. Basically everything is the same. Long story short. I just had to reset where the file should be save in the Log File menu and everything works again. Thanks for your help. |
#4
|
|||
|
|||
Hi Hang,
The Log Session from File menu brings up a window that allows you to select the location by browsing for it. So the fully-qualified path is created by you drilling down through folders. This is a different mechanism than setting a path via the LogFileName property. ![]() Quote:
I have added this thread to a feature request in our product enhancement database to have a default log file location for unqualified log paths. Should a future release of SecureCRT include this feature, notification will be posted here. If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13029" in the subject line or use this form from the support page of our website.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#5
|
|||
|
|||
Hi Brenda,
I didn't use the Log Session from the File menu. I was in Options>Session Option>Terminal>Log File and set the path there, once. Quote:
Can you show me how to set log file location so it will save it there every time the script runs? Right now I am still doing it manually before I run my script if I want to save it to specific location using the Log File in the Session Options menu. Here is a snippet of my code: Code:
currentTab = crt.GetScriptTab() filename = crt.Dialog.Prompt("Enter filename") currentTab.Session.Log(False) def test1: Test1 = currentTab.Session.LogFileName = filename + "Test1.log" currentTab.Screen.Synchronous = True currentTab.Session.Log(True) ... CODE ... currentTab.Session.Log(False) def test2: Test2 = currentTab.Session.LogFileName = filename + "Test2.log" currentTab.Screen.Synchronous = True currentTab.Session.Log(True) ... CODE ... currentTab.Session.Log(False) def test3: ... CODE ... def test4: ... CODE ... test1() test2() test3() test4() |
#6
|
|||
|
|||
Hi Hang,
Default Session is what is used if you are not connecting with a saved session. So it sounds like there is where you would want to set the common log folder options.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Tags |
log |
Thread Tools | |
Display Modes | Rate This Thread |
|
|