App Engine Python SDK  v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
Public Member Functions | Public Attributes | List of all members
google.appengine.tools.appcfg.LogsRequester Class Reference
Inheritance diagram for google.appengine.tools.appcfg.LogsRequester:

Public Member Functions

def __init__
 
def DownloadLogs
 
def RequestLogLines
 

Public Attributes

 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
 

Detailed Description

Provide facilities to export request logs.

Constructor & Destructor Documentation

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.

Member Function Documentation

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: