.theia/logs folder is not cleaned.
Create VS code extension which writes logs to context.logPath received in activate() method.
In my VS Code extension I have:
export function activate(context: vscode.ExtensionContext).
The value of context.logPath on my environment is .theia/logs/20200109T092254/host/
OS and Theia version:
OS: Linux
Theia version: v0.14.0
Diagnostics:
"ls .theia/logs/" shows many folders named as timestamps like 20200109T092254. Currently I see that the oldest one is from the time I created my container.
@ira-gordin-sap
Thanks for the issue, do you know the current behavior in VS Code?
When are log files cleaned? At which interval? I assume log files are generally cleaned when an extension is deactivated/uninstalled.
I don't know the current behavior in VS Code.
I am not sure it should happen when an extension is deactivated/uninstalled. I am not sure when deactivate happens on theia.
I thought about automatic clean once a configurable time.
@ira-gordin-sap when testing, which plugins were you using?
I'm trying to determine if it is the responsibility of the plugins to cleanup their log files, or the application itself at some point (and which point/interval).
@vince-fugnitto I am implementing log in my VS code extension.
My colleague have found here: https://github.com/microsoft/vscode/issues/75539 that VS Code retains logs of last 10 sessions. (I verified it on my environment.)
The relevant code is here: https://github.com/Microsoft/vscode/blob/613447d6b3f458ef7fee227e3876303bf5184580/src/vs/code/electron-browser/sharedProcess/contrib/logsDataCleaner.ts#L12
microsoft/vscode#75539
Thank you for investigating further and following up.
Is it something you'd like to handle? PRs are always welcome and you can copy the code from VS Code directly so long as a Contribution Questionnaire (CQ) is registered.
you can copy the code from VS Code directly
Are these APIs available directly in Theia or should alternatives be used?
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { join, dirname, basename } from 'vs/base/common/path';
import { readdir, rimraf } from 'vs/base/node/pfs';
import { onUnexpectedError } from 'vs/base/common/errors';
import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
you can copy the code from VS Code directly
Are these APIs available directly in Theia or should alternatives be used?
import { IEnvironmentService } from 'vs/platform/environment/common/environment'; import { join, dirname, basename } from 'vs/base/common/path'; import { readdir, rimraf } from 'vs/base/node/pfs'; import { onUnexpectedError } from 'vs/base/common/errors'; import { Disposable, toDisposable } from 'vs/base/common/lifecycle';
Looking at the code previously referenced, there does not seem to be anything preventing getting the feature to work properly. There are definitely internal Theia methods and APIs that can be used to compliment the feature. Please note that if a straight copy+paste cannot be used, you can always inspire yourself from their implementation.
Thank you for investigating further and following up.
Is it something you'd like to handle? PRs are always welcome and you can copy the code from VS Code directly so long as a Contribution Questionnaire (CQ) is registered.
I would very much like to handle. Waiting for approval from my product owner.
Thank you for investigating further and following up.
Is it something you'd like to handle? PRs are always welcome and you can copy the code from VS Code directly so long as a Contribution Questionnaire (CQ) is registered.I would very much like to handle. Waiting for approval from my product owner.
Sounds great!
Hello.
I have a fix here:
However I have reservations regarding the Eclipse Foundation Licensing.
I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my signoff) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
Does providing a Physical Postal Address Mandatory to Sign the eclipse ECA?
Is this a question that should be forwarded to eclipse foundation legal department?
Could my Employer's (who I am making the contribution on behalf of) address be provided?
Even more generally an address of my Employer in a different country than the one I reside in?
@marcdumais-work perhaps you can help regarding the Eclipse ECA questions?
@bd82 when I signed up, I did not provide any address information as I believe it is unnecessary (although I'm not sure if this policy has changed).
Hi @bd82,
Could my Employer's (who I am making the contribution on behalf of) address be provided?
Even more generally an address of my Employer in a different country than the one I reside in?
First I do not speak for the Eclipse Foundation and IINAL. If you feel the need, we can involve someone from the foundation to get a more definitive answer.
Looking at my own ECA, I provided the address of my employer, so I think that's fine if you contribute in the context of your work. As far as I know, the country of your employer being different from your own would not matter - your employer's address is what it is.
Looking at my own ECA, I provided the address of my employer, so I think that's fine if you contribute in the context of your work. As far as I know, the country of your employer being different from your own would not matter - your employer's address is what it is.
O.k. sounds good enough. I will continue creating the PR tomorrow.
Cheers.
o.k. I used my employer's physical address.
A PR was created: https://github.com/eclipse-theia/theia/pull/6956
This could be used as a stepping stone to include also configurable options: e.g:
Cheers.
Shahar.
o.k. I used my employer's physical address.
The ECA check on your PR passed, so you're all set