I’m trying to fetch logs (using LogService API Java SDK 1.7.0) for multiple major version ids.
Example: fetch logs for app versions 1 and 2:
...
logquery.majorVersionIds(Arrays.asList("1","2"));
ls.fetch(logquery);
...
but it throws this exception:
com.google.appengine.api.log.InvalidRequestException: Exactly one major version id must be specified.
at com.google.appengine.api.log.LogServiceImpl$1.convertException(LogServiceImpl.java:108)
at com.google.appengine.api.utils.FutureWrapper.get(FutureWrapper.java:106)
at com.google.appengine.api.log.LogServiceImpl.fetch(LogServiceImpl.java:31)
at com.google.appengine.api.log.LogServiceImpl.fetch(LogServiceImpl.java:22)
Am I doing something wrong or this is not supported?
Java doc says:
public LogQuery majorVersionIds(java.util.List<java.lang.String> versionIds)
A setter that allows the user to specify the major app versions whose log data should be read.
This is a problem of the documentation. The error you are getting is telling you that only one version_id can be specified at the time. The python docs state that:
In the future you can create an issue in the external issue tracker.
ps: I filed an internal issue to fix this.