|
| rpcserver |
|
| app_id |
|
| output_file |
|
| append |
|
| num_days |
|
| severity |
|
| vhost |
|
| include_vhost |
|
| include_all |
|
| error_fh |
|
| module |
|
| version_id |
|
| sentinel |
|
| write_mode |
|
| skip_until |
|
| valid_dates |
|
Provide facilities to export request logs.
def google.appengine.tools.appcfg.LogsRequester.__init__ |
( |
|
self, |
|
|
|
rpcserver, |
|
|
|
app_id, |
|
|
|
module, |
|
|
|
version_id, |
|
|
|
output_file, |
|
|
|
num_days, |
|
|
|
append, |
|
|
|
severity, |
|
|
|
end, |
|
|
|
vhost, |
|
|
|
include_vhost, |
|
|
|
include_all = None , |
|
|
|
time_func = time.time , |
|
|
|
error_fh = sys.stderr |
|
) |
| |
Constructor.
Args:
rpcserver: The RPC server to use. Should be an instance of HttpRpcServer
or TestRpcServer.
app_id: The application to fetch logs from.
module: The module of the app to fetch logs from, optional.
version_id: The version of the app to fetch logs for.
output_file: Output file name.
num_days: Number of days worth of logs to export; 0 for all available.
append: True if appending to an existing file.
severity: App log severity to request (0-4); None for no app logs.
end: date object representing last day of logs to return.
vhost: The virtual host of log messages to get. None for all hosts.
include_vhost: If true, the virtual host is included in log messages.
include_all: If true, we add to the log message everything we know
about the request.
time_func: A time.time() compatible function, which can be overridden for
testing.
error_fh: Where to send status and error messages.
def google.appengine.tools.appcfg.LogsRequester.DownloadLogs |
( |
|
self | ) |
|
Download the requested logs.
This will write the logs to the file designated by
self.output_file, or to stdout if the filename is '-'.
Multiple roundtrips to the server may be made.
def google.appengine.tools.appcfg.LogsRequester.RequestLogLines |
( |
|
self, |
|
|
|
tf, |
|
|
|
offset |
|
) |
| |
Make a single roundtrip to the server.
Args:
tf: Writable binary stream to which the log lines returned by
the server are written, stripped of headers, and excluding
lines skipped due to self.sentinel or self.valid_dates filtering.
offset: Offset string for a continued request; None for the first.
Returns:
The offset string to be used for the next request, if another
request should be issued; or None, if not.
The documentation for this class was generated from the following file:
- code/googleappengine-read-only/python/google/appengine/tools/appcfg.py