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

ApexLog always says no logs available #40

Open
TyeBHarrison opened this issue Jan 9, 2015 · 3 comments
Open

ApexLog always says no logs available #40

TyeBHarrison opened this issue Jan 9, 2015 · 3 comments

Comments

@TyeBHarrison
Copy link

Any time I use ApexLog it says "No Log file available".
vim-force.com is working. I can edit, ApexSave, ApexDeploy, and use ApexQuery with ApexScratch.
I have debug logs turned on for my dev user account on Salesforce and can view new logs on Salesforce.com website/dev console.

@neowit
Copy link
Owner

neowit commented Jan 9, 2015

:ApexLog is just a shortcut to open a local log file previously generated by one of the commands which accepts log level before this command is executed.
e.g. if you call :ApexExecuteAnonymous or :ApexTest and select a log type (other than None) then you get a log file open when command is completed (if completion was successful). If you close buffer with log file then you can then call :ApexLog to open log file again.

:ApexLog does not retrieve any existing debug logs from SFDC.

@TyeBHarrison
Copy link
Author

Ah. Obviously, I completely misunderstood that from the docs.

In that case, since there is no API, is it within the spirit/scope of vim-force.com to use a query like:
SELECT Id, SystemModStamp FROM ApexLog WHERE LogUserId = "<UserID>"
Then use the returned Log Ids in a URL substitution to grab the raw log with Vim?
I'm just trying to find ways to quickly get to the debug logs and avoid the dev console as much as possible.

@neowit
Copy link
Owner

neowit commented Jan 10, 2015

Main reason why real log retrieval has not been implemented is because I have not given it much thought in terms of usability and did not research API capabilities in this area.

On issue is that (as far as I understand) SFDC does not generate logs, unless explicitly requested to do so.
In the example you mentioned - it is not a problem to download last log from SFDC - but unless you request that log to be generated in the first place, there will be no useful logs to look at.

If you have any ideas in terms of overall user flow and functionality in this area please share.

PS: turns out SFDC API actually does provide a REST resource to download a raw log file by Id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants