Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zowe explorer writes logs into the wrong folder #1926

Closed
Tracked by #1955 ...
kristinochka opened this issue Aug 26, 2022 · 5 comments
Closed
Tracked by #1955 ...

Zowe explorer writes logs into the wrong folder #1926

kristinochka opened this issue Aug 26, 2022 · 5 comments
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases

Comments

@kristinochka
Copy link
Contributor

Describe the bug
I expected Zowe Explorer to write logs to the following folder: /Users/kristinamayo/.zowe/zowe/logs
However, it's not the case. On my computer Zowe Explorer writes logs in the following folders:

/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/logs/zowe.log /Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/logs/zowe.log

It’s duplicating path to zowe-explorer (/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer) many times and then logging there.

I deleted the nested folders above and now it’s creating nested folders in here:
/Users/kristinamayo/.vscode/extensions/zowe.vscode-extension-for-zowe-2.2.0-SNAPSHOT/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/Users/kristinamayo/wazi/vscode-extension-for-zowe/packages/zowe-explorer/logs/zowe.log
For every new zowe.log, it creates a nested folder with a long path

To Reproduce

Expected behavior
I expected Zowe Explorer to write logs to the following folder: /Users/kristinamayo/.zowe/zowe/logs and not duplicate the directory path

Screenshots

Desktop (please complete the following information):

  • OS:
  • Zowe Explorer Version:
  • (Optional) Zowe CLI Version:
  • (Optional) Are you using Secure Credential Store?

Additional context

@kristinochka kristinochka added the bug Something isn't working label Aug 26, 2022
@github-actions
Copy link

Thank you for creating a bug report. If you haven't already, please ensure you have provided steps to reproduce it and as much context as possible.

@zFernand0 zFernand0 added the priority-medium Not functioning - next quarter if capacity permits label Oct 5, 2022
@JillieBeanSim
Copy link
Contributor

@kristinochka is this only an issue when using Dev Host or also when the vsix is installed?

@JillieBeanSim JillieBeanSim mentioned this issue Oct 12, 2022
33 tasks
@JillieBeanSim JillieBeanSim mentioned this issue Jan 5, 2023
31 tasks
@JillieBeanSim JillieBeanSim added v2.6.1 and removed 22PI4 labels Feb 1, 2023
@zFernand0 zFernand0 added this to the v2.6.1 milestone Feb 7, 2023
@JTonda JTonda added the severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases label Feb 7, 2023
@zFernand0 zFernand0 removed the v2.6.1 label Feb 14, 2023
@zFernand0 zFernand0 modified the milestones: v2.6.1, v2.7.0 Feb 14, 2023
@zFernand0 zFernand0 modified the milestones: v2.7.0, v2.8.0 Mar 14, 2023
@t1m0thyj
Copy link
Member

t1m0thyj commented Mar 15, 2023

We could investigate writing logs into the same folder as VS Code:
image

Edit: Looked into this some more, we could achieve this by replacing context.extensionPath with context.logUri.fsPath here. However I'm not sure if we want to, because we would have less control over the log file. VS Code seems to create a new log folder for every window that is opened and may clean it up after being closed.

@kristinochka
Copy link
Contributor Author

@t1m0thyj VS Code puts their logs in a place that's difficult to navigate to or find if you're not a VS Code developer and it does create new folders for each session. If we add it there, user needs to be able to find it easily. There is a ticket to create Zowe Explorer output window in VS Code. Logs could be printed to the Output window and it would print the location of the log file on disk.
Like the screenshot below:
image

@JillieBeanSim has plans to work on this feature.

@JillieBeanSim JillieBeanSim mentioned this issue Mar 27, 2023
27 tasks
@JillieBeanSim JillieBeanSim removed this from the v2.8.0 milestone Apr 24, 2023
@JillieBeanSim JillieBeanSim mentioned this issue Jun 27, 2023
29 tasks
@JillieBeanSim
Copy link
Contributor

This has been fixed with the introduction of the Zowe Explorer output logger, now the location while running Extension Development Host ./packages/zowe-explorer/logs and installation in VS Code writes to default vscode location for the extension or the setting zowe.files.logsFolder.path. Location of the log is displayed in the second line of Zowe Explorer output logger during activation
Screen Shot 2023-09-08 at 3 40 03 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority-medium Not functioning - next quarter if capacity permits severity-low Bug that makes the usage of the Zowe less convenient but doesn't impact key use cases
Projects
None yet
Development

No branches or pull requests

5 participants